Created
December 28, 2012 19:33
-
-
Save boxxxie/4401133 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def user-to-add { | |
:name "sharedadmin" | |
:email "enginuity@enginuity.com" | |
:display_name "En Ginuity" | |
:password "somepass" | |
}) | |
(def deftest-datomic | |
(do-template [deftest-name schemas body] | |
(deftest deftest-name | |
(ds/start {:schemas schemas}) | |
(binding [*connection* (d/connect *uri*)] body)))) | |
(deftest-datomic add-and-retrieve-user user/schema | |
(testing "did we actually add a user to the db and can we find them by name?" | |
(let [added-user (user/add user-to-add) | |
looked-up-user (user/find-first {:name (:name user-to-add)})] | |
(is (= added-user looked-up-user))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment