Commit 1c517153a889f77f0a2c321ce4e013f4504253e9

Authored by Dmitriy Zaporozhets
1 parent 9a5c152c

fix admin users tests

app/views/notify/new_user_email.text.erb
... ... @@ -3,6 +3,8 @@ Hi <%= @user.name %>!
3 3 Administrator created account for you. Now you are a member of company GitLab application.
4 4  
5 5 login.................. <%= @user.email %>
6   -password............... <%= @password %>
  6 +<% unless Gitlab.config.gitlab.signup_enabled %>
  7 + password............... <%= @password %>
  8 +<% end %>
7 9  
8 10 Click here to login: <%= url_for(root_url) %>
... ...
spec/features/admin/admin_users_spec.rb
... ... @@ -55,8 +55,8 @@ describe &quot;Admin::Users&quot; do
55 55 user = User.last
56 56 email = ActionMailer::Base.deliveries.last
57 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 60 end
61 61 end
62 62  
... ... @@ -67,8 +67,8 @@ describe &quot;Admin::Users&quot; do
67 67 user = User.last
68 68 email = ActionMailer::Base.deliveries.last
69 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 72 end
73 73 end
74 74 end
... ...