                          :amount 103M
                          :balance 103M}]
         actual-items (map #(select-keys % [:index :amount :balance])
-                          (transactions/items-by-account storage-spec (:id groceries)))]
+                          (items-by-account (:id groceries)))]
     (testing "item values are correct"
       (is (= expected-items actual-items)
           "The Pets account should have the correct items"))

                                               ; the 4th item should never be updated because the 4rd one did not change a value
            actual (get @update-calls (:id checking))]
        (testing "the expected transactions are updated"
          (is (= expected actual)
              "Only items with changes are updated")
          (is (not-any? #(= (:index %) 4) actual) "The last item is never updated"))

         groceries] (:accounts context)
        [t1 t2 t3 t4] (:transactions context)
        _ (transactions/update storage-spec (assoc-in t3 [:items 0 :account-id] (:id rent)))
        groceries-items (items-by-account (:id groceries))
        rent-items (items-by-account (:id rent))
        expected-groceries [{:index 1
                             :amount 103M
                             :balance 204M}
