Commit 8968f6d8 authored by Marin Jankovski's avatar Marin Jankovski

Update specs.

parent 44b81983
module Emails module Emails
module Profile module Profile
def new_user_email(user_id, password, token) def new_user_email(user_id, password, token = nil)
@user = User.find(user_id) @user = User.find(user_id)
@password = password @password = password
@target_url = user_url(@user) @target_url = user_url(@user)
......
...@@ -43,7 +43,7 @@ describe Notify do ...@@ -43,7 +43,7 @@ describe Notify do
let(:example_site_path) { root_path } let(:example_site_path) { root_path }
let(:new_user) { create(:user, email: 'newguy@example.com', created_by_id: 1) } let(:new_user) { create(:user, email: 'newguy@example.com', created_by_id: 1) }
subject { Notify.new_user_email(new_user.id, new_user.password) } subject { Notify.new_user_email(new_user.id, new_user.password, 'kETLwRaayvigPq_x3SNM') }
it_behaves_like 'an email sent from GitLab' it_behaves_like 'an email sent from GitLab'
...@@ -59,8 +59,12 @@ describe Notify do ...@@ -59,8 +59,12 @@ describe Notify do
should have_body_text /#{new_user.email}/ should have_body_text /#{new_user.email}/
end end
it 'contains the new user\'s password' do it 'contains the password text' do
should have_body_text /password/ should have_body_text /Click here to set your password/
end
it 'includes a link for user to set password' do
should have_body_text 'http://localhost/users/password/edit?reset_password_token=kETLwRaayvigPq_x3SNM'
end end
it 'includes a link to the site' do it 'includes a link to the site' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment