Created
July 28, 2014 15:05
-
-
Save shargoj/aa34d2d8c1b3c7b18808 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
(deftest rested-removed-data-should-reflect-in-db | |
(with-test-db simple-schema | |
(let [scm-a (scm {:val1 "name" :val2 123124}) | |
scm-b (scm {:val1 "name"})] | |
@(db/transact *conn* [(sp->nested-map-for-transaction (db) scm-a)]) | |
@(db/transact *conn* [(sp->nested-map-for-transaction (db) scm-b)]) | |
(let [eid (ffirst (db/q '[:find ?eid :where [?eid :scm/val1 "name"]] (db))) | |
entity (db/entity (db) eid)] | |
(is (nil? (:scm/val2 entity))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment