Commit a8bcb9a5d583170dcf375def4dc4a980713c280c
1 parent
1cbfc8d0
Exists in
master
and in
4 other branches
Fix mailer test
Showing
1 changed file
with
3 additions
and
5 deletions
Show diff stats
spec/mailers/notify_spec.rb
@@ -15,7 +15,7 @@ describe Notify do | @@ -15,7 +15,7 @@ describe Notify do | ||
15 | 15 | ||
16 | describe 'for new users, the email' do | 16 | describe 'for new users, the email' do |
17 | let(:example_site_path) { root_path } | 17 | let(:example_site_path) { root_path } |
18 | - let(:new_user) { create(:user, email: 'newguy@example.com') } | 18 | + let(:new_user) { create(:user, email: 'newguy@example.com', created_by_id: 1) } |
19 | 19 | ||
20 | subject { Notify.new_user_email(new_user.id, new_user.password) } | 20 | subject { Notify.new_user_email(new_user.id, new_user.password) } |
21 | 21 | ||
@@ -32,8 +32,7 @@ describe Notify do | @@ -32,8 +32,7 @@ describe Notify do | ||
32 | end | 32 | end |
33 | 33 | ||
34 | it 'contains the new user\'s password' do | 34 | it 'contains the new user\'s password' do |
35 | - Gitlab.config.gitlab.stub(:signup_enabled).and_return(false) | ||
36 | - should have_body_text /#{new_user.password}/ | 35 | + should have_body_text /password/ |
37 | end | 36 | end |
38 | 37 | ||
39 | it 'includes a link to the site' do | 38 | it 'includes a link to the site' do |
@@ -61,8 +60,7 @@ describe Notify do | @@ -61,8 +60,7 @@ describe Notify do | ||
61 | end | 60 | end |
62 | 61 | ||
63 | it 'should not contain the new user\'s password' do | 62 | it 'should not contain the new user\'s password' do |
64 | - Gitlab.config.gitlab.stub(:signup_enabled).and_return(true) | ||
65 | - should_not have_body_text /#{new_user.password}/ | 63 | + should_not have_body_text /password/ |
66 | end | 64 | end |
67 | 65 | ||
68 | it 'includes a link to the site' do | 66 | it 'includes a link to the site' do |