                       (v/validate-change-password ...invalid-params...) => {:new-password :too-short}))
 
               (fact "when authorisation fails"
-                    (-> (u/change-password @storage/user-store (th/create-request :post "/change-password" ...params-with-wrong-current-password...))
+                    (-> (u/change-password ...user-store... (th/create-request :post "/change-password" ...params-with-wrong-current-password...))
                         :body
                         html/html-snippet
                         (html/select [:.clj--validation-summary__item])) =not=> empty?

                          :attrs
                          :value)) => "client-id"
                    (provided
                      (user/is-authorised-client-for-user? @storage/user-store ...email... "client-id") => true
                      (c/retrieve-client anything "client-id") => {:client-id "client-id" :name "CLIENT_NAME"}))

              (fact "client name is correctly shown on the page"
                    (let [element-has-correct-client-name-fn (fn [element] (= (html/text element) "CLIENT_NAME"))
                          request (th/create-request :get (routes/path :show-unshare-profile-card)
                                                  {:client_id "client-id"}
                                                  {:user-login ...email...})]
                      (-> (u/show-unshare-profile-card @storage/user-store request)
                          :body
                          html/html-snippet
                          (html/select [:.clj--client-name])) => (has some element-has-correct-client-name-fn)
                      (provided
                        (user/is-authorised-client-for-user? @storage/user-store ...email... "client-id") => true
                        (c/retrieve-client anything "client-id") => {:client-id "client-id" :name "CLIENT_NAME"})))

              (fact "missing client_id query param responds with 404"
                    (->> (th/create-request :get (routes/path :show-unshare-profile-card) nil)
                         (u/show-unshare-profile-card @storage/user-store)) => {:status 404})

              (fact "user is redirected to /profile if client_id is not in user's list of authorised clients"
                    (->> (th/create-request :get (routes/path :show-unshare-profile-card)
                                         {:client_id ...client-id...}
                                         {:user-login ...email...})
                         (u/show-unshare-profile-card @storage/user-store)) => (check-redirects-to "/profile")
                    (provided
                      (user/is-authorised-client-for-user? @storage/user-store ...email... ...client-id...) => false)))

       (facts "about post requests to /unshare-profile-card"
              (fact "posting to /unshare-profile-card with client-id in the form params should remove client-id from the user's authorised clients and then redirect the user to the profile page"
                    (->> (th/create-request :post "/unshare-profile-card" {:client_id "client-id"} {:user-login "user@email.com"})
                         (u/unshare-profile-card @storage/user-store)) => (check-redirects-to "/profile")
                    (provided
                      (user/remove-authorised-client-for-user! @storage/user-store "user@email.com" "client-id") => anything))))

                    (let [request (th/create-request :get (routes/path :show-unshare-profile-card)
                                                  {:client_id "client-id"}
                                                  {:user-login ...email...})]
                      (-> (u/show-unshare-profile-card ...user-store... request)
                          :body
                          html/html-snippet
                          (html/select [:.clj--client-id__input])
