]> cat aescling's git repositories - mastodon.git/commitdiff
Spec Admin::ResetsController calls send_reset_password_instructions (#3354)
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Mon, 29 May 2017 16:09:17 +0000 (01:09 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 29 May 2017 16:09:17 +0000 (18:09 +0200)
spec/controllers/admin/resets_controller_spec.rb

index a0a77478e03b0460b8819a94fb4b17d2aebe2e41..a20a460bd0559322d9248668d7e6f12f38a7bf15 100644 (file)
@@ -10,6 +10,10 @@ describe Admin::ResetsController do
 
   describe 'POST #create' do
     it 'redirects to admin accounts page' do
+      expect_any_instance_of(User).to receive(:send_reset_password_instructions) do |value|
+        expect(value.account_id).to eq account.id
+      end
+
       post :create, params: { account_id: account.id }
 
       expect(response).to redirect_to(admin_accounts_path)