     (is (validation/has-error? transaction :items) "Validation error should be present")))
 
 (deftest item-balances-are-set-when-saved
-  (let [transaction (transactions/create
+  (let [context (test-context)
+        attributes (:attributes context)
+        accounts (:accounts context)
+        transaction (transactions/create
                       storage-spec
                       attributes)
         salary-item (->> transaction

    (is (validation/has-error? transaction :items))))

(deftest item-amount-is-required
  (let [transaction (transactions/create
                      storage-spec
                      (update-in attributes
                                 [:items 0]

    (is (validation/has-error? transaction :items) "Validation error should be present")))

(deftest item-amount-must-be-greater-than-zero
  (let [context (test-context)
        attributes (:attributes context)
        transaction (transactions/create
                      storage-spec
                      (update-in attributes
                                 [:items 0]
