aboutsummaryrefslogtreecommitdiffstats
path: root/spec/mailers/user_mailer_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/mailers/user_mailer_spec.rb')
-rw-r--r--spec/mailers/user_mailer_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb
new file mode 100644
index 000000000..2471de988
--- /dev/null
+++ b/spec/mailers/user_mailer_spec.rb
@@ -0,0 +1,21 @@
+require "spec_helper"
+
+describe UserMailer do
+
+ describe "welcome" do
+ let(:user) {Factory(:user)}
+
+ it "should verify if email send" do
+ email = UserMailer.welcome(user).deliver
+ ActionMailer::Base.deliveries.empty?.should be_false
+ end
+
+ it "should verify the content of sending email" do
+ email = UserMailer.welcome(user).deliver
+ email.to.should == [user.email]
+ email.subject.should == "Welcome to #{user.organisation.name}"
+ end
+
+ end
+
+end