         "The shares-owned value of the original lot is updated")
     (is (:transaction result)
         "The result contains the transaction record")
+    (when-not (= expected-transaction actual-transaction)
+      (pprint {:expected expected-transaction
+               :actual actual-transaction
+               :diff (diff expected-transaction actual-transaction)}))
     (is (= expected-transaction actual-transaction)
         "The transaction contains the correct attributes")
     (is (empty? (-> result :transaction validation/error-messages))

                                       :index 2}
                                      {:action :credit
                                       :account-id (:id commodity-account)
                                       :amount 25M
                                       :balance 75M
                                       :value 250M

                                            :commodity-id (:id commodity)
                                            :account-id (:id ira)
                                            :value 1000M})
        result (trading/unbuy storage-spec (:transaction purchase))]
    ; TODO Should we delete the price that was created?
    (testing "the account balance"
      (is (= 2000M (:balance (accounts/reload storage-spec ira)))
