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

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/mail/csrf_token_fail_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/workers/mail/csrf_token_fail_spec.rb b/spec/workers/mail/csrf_token_fail_spec.rb
new file mode 100644
index 000000000..321b06dc4
--- /dev/null
+++ b/spec/workers/mail/csrf_token_fail_spec.rb
@@ -0,0 +1,18 @@
+# Copyright (c) 2010-2011, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3 or later. See
+# the COPYRIGHT file.
+
+require "spec_helper"
+
+describe Workers::Mail::CsrfTokenFail do
+ describe "#perfom" 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(:csrf_token_fail).with(user.id).and_return(mail_double)
+
+ Workers::Mail::CsrfTokenFail.new.perform(user.id)
+ end
+ end
+end