Commit 1c517153a889f77f0a2c321ce4e013f4504253e9
1 parent
9a5c152c
Exists in
master
and in
4 other branches
fix admin users tests
Showing
2 changed files
with
7 additions
and
5 deletions
Show diff stats
app/views/notify/new_user_email.text.erb
@@ -3,6 +3,8 @@ Hi <%= @user.name %>! | @@ -3,6 +3,8 @@ Hi <%= @user.name %>! | ||
3 | Administrator created account for you. Now you are a member of company GitLab application. | 3 | Administrator created account for you. Now you are a member of company GitLab application. |
4 | 4 | ||
5 | login.................. <%= @user.email %> | 5 | login.................. <%= @user.email %> |
6 | -password............... <%= @password %> | 6 | +<% unless Gitlab.config.gitlab.signup_enabled %> |
7 | + password............... <%= @password %> | ||
8 | +<% end %> | ||
7 | 9 | ||
8 | Click here to login: <%= url_for(root_url) %> | 10 | Click here to login: <%= url_for(root_url) %> |
spec/features/admin/admin_users_spec.rb
@@ -55,8 +55,8 @@ describe "Admin::Users" do | @@ -55,8 +55,8 @@ describe "Admin::Users" do | ||
55 | user = User.last | 55 | user = User.last |
56 | email = ActionMailer::Base.deliveries.last | 56 | email = ActionMailer::Base.deliveries.last |
57 | email.subject.should have_content("Account was created") | 57 | email.subject.should have_content("Account was created") |
58 | - email.body.should have_content(user.email) | ||
59 | - email.body.should have_content(@password) | 58 | + email.text_part.body.should have_content(user.email) |
59 | + email.text_part.body.should have_content(@password) | ||
60 | end | 60 | end |
61 | end | 61 | end |
62 | 62 | ||
@@ -67,8 +67,8 @@ describe "Admin::Users" do | @@ -67,8 +67,8 @@ describe "Admin::Users" do | ||
67 | user = User.last | 67 | user = User.last |
68 | email = ActionMailer::Base.deliveries.last | 68 | email = ActionMailer::Base.deliveries.last |
69 | email.subject.should have_content("Account was created") | 69 | email.subject.should have_content("Account was created") |
70 | - email.body.should have_content(user.email) | ||
71 | - email.body.should_not have_content(@password) | 70 | + email.text_part.body.should have_content(user.email) |
71 | + email.text_part.body.should_not have_content(@password) | ||
72 | end | 72 | end |
73 | end | 73 | end |
74 | end | 74 | end |