Commit a8bcb9a5d583170dcf375def4dc4a980713c280c

Authored by Dmitriy Zaporozhets
1 parent 1cbfc8d0

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 15  
16 16 describe 'for new users, the email' do
17 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 20 subject { Notify.new_user_email(new_user.id, new_user.password) }
21 21  
... ... @@ -32,8 +32,7 @@ describe Notify do
32 32 end
33 33  
34 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 36 end
38 37  
39 38 it 'includes a link to the site' do
... ... @@ -61,8 +60,7 @@ describe Notify do
61 60 end
62 61  
63 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 64 end
67 65  
68 66 it 'includes a link to the site' do
... ...