testing with parts of an app
This commit is contained in:
parent
50055e7b8b
commit
beef424715
1 changed files with 17 additions and 0 deletions
17
test/check/parts_test.clj
Normal file
17
test/check/parts_test.clj
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
(ns check.parts-test
|
||||
(:require [mount :refer [defstate] :as m]
|
||||
[app.nyse :refer [conn]]
|
||||
[clojure.test :refer :all]))
|
||||
|
||||
(defstate should-not-start :start (throw (RuntimeException. "should not have been started!")))
|
||||
|
||||
(defn with-parts [f]
|
||||
(m/start #'app.config/app-config #'app.nyse/conn)
|
||||
(f)
|
||||
(m/stop #'app.config/app-config #'app.nyse/conn))
|
||||
|
||||
(use-fixtures :each with-parts)
|
||||
|
||||
(deftest start-only-parts
|
||||
(is (instance? datomic.peer.LocalConnection conn))
|
||||
(is (instance? mount.NotStartedState should-not-start)))
|
||||
Loading…
Reference in a new issue