 (use-fixtures :each (partial reset-db storage-spec))
 
 (def ^:private attachments-context
-  {:users [(factory :user, {:email "john@doe.com"})]
+  {:users [(factory :user, {:email "john@doe.com"})
+           (factory :user, {:email "jane@doe.com"})]
    :entities [{:name "Personal"}]
    :commodities [{:name "US Dollar"
                   :symbol "USD"

                                             tag-resource]]
            [clj-money.models.attachments :as attachments]
            [clj-money.models.grants :as grants]
            [clj-money.permissions.attachments]
            [clj-money.test-helpers :refer [reset-db
                                            with-authentication

(deftest attachment-management
  (let [context (serialization/realize storage-spec attachments-context)
        [john jane] (find-users context "john@doe.com" "jane@doe.com")
        attachment (find-attachment context "receipt")
        transaction (transactions/find-by-id storage-spec
                                             (:transaction-id attachment))]
    (testing "A user has permissions on attachment in his own entities"
      (with-authentication john
        (doseq [action [:show :edit :update :delete]]
