Properly expose Datomic connection.

Exposing db is too little, as it is an immutable value of the database and cannot be transacted upon. For transaction a connection is necessary and from this a value can be taken at any time. 
Also in tests, I am not sure what you are testing, in (is form1 form2) form1 is a boolean expression determining the tests outcome, so you have to do (is (= form1 form2)) if you want to test this.