mount/test/check/parts_test.clj

18 lines
480 B
Clojure
Raw Normal View History

2015-11-14 16:05:22 +00:00
(ns check.parts-test
2015-11-17 05:09:45 +00:00
(:require [mount.core :as mount :refer [defstate] :as m]
2015-11-14 16:05:22 +00:00
[app.nyse :refer [conn]]
[clojure.test :refer :all]))
2015-11-15 19:40:34 +00:00
(defstate should-not-start :start (constantly 42))
2015-11-14 16:05:22 +00:00
(defn with-parts [f]
(m/start #'app.config/app-config #'app.nyse/conn)
(f)
2015-11-15 19:40:34 +00:00
(m/stop))
2015-11-14 16:05:22 +00:00
(use-fixtures :each with-parts)
(deftest start-only-parts
(is (instance? datomic.peer.LocalConnection conn))
2015-11-17 05:09:45 +00:00
(is (instance? mount.core.NotStartedState should-not-start)))