Welcome to mirror list, hosted at ThFree Co, Russian Federation.

csrf_token_fail_spec.rb « mail « workers « spec - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8c94f86637b8fa9879fbb053b673cd6ac60c98cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
#   licensed under the Affero General Public License version 3 or later.  See
#   the COPYRIGHT file.

describe Workers::Mail::CsrfTokenFail do
  describe "#perform" do
    it "should call .deliver on the notifier object" do
      user = alice
      mail_double = double
      expect(mail_double).to receive(:deliver_now)
      expect(Notifier).to receive(:send_notification).with("csrf_token_fail", user.id).and_return(mail_double)

      Workers::Mail::CsrfTokenFail.new.perform(user.id)
    end
  end
end