summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-14 12:58:12 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-14 12:58:12 +0300
commita8bcb9a5d583170dcf375def4dc4a980713c280c (patch)
tree7fe8b528ec0098e45544f492bf76574d7cb78574
parent1cbfc8d0af7dabb88da8628d5706f7e721ce90ce (diff)
downloadgitlab-ce-a8bcb9a5d583170dcf375def4dc4a980713c280c.tar.gz
Fix mailer test
-rw-r--r--spec/mailers/notify_spec.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 84ce7e86d27..d2e1e8a8743 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -15,7 +15,7 @@ describe Notify do
describe 'for new users, the email' do
let(:example_site_path) { root_path }
- let(:new_user) { create(:user, email: 'newguy@example.com') }
+ let(:new_user) { create(:user, email: 'newguy@example.com', created_by_id: 1) }
subject { Notify.new_user_email(new_user.id, new_user.password) }
@@ -32,8 +32,7 @@ describe Notify do
end
it 'contains the new user\'s password' do
- Gitlab.config.gitlab.stub(:signup_enabled).and_return(false)
- should have_body_text /#{new_user.password}/
+ should have_body_text /password/
end
it 'includes a link to the site' do
@@ -61,8 +60,7 @@ describe Notify do
end
it 'should not contain the new user\'s password' do
- Gitlab.config.gitlab.stub(:signup_enabled).and_return(true)
- should_not have_body_text /#{new_user.password}/
+ should_not have_body_text /password/
end
it 'includes a link to the site' do