Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
8968f6d8
Commit
8968f6d8
authored
Jul 16, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update specs.
parent
44b81983
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
app/mailers/emails/profile.rb
app/mailers/emails/profile.rb
+1
-1
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+7
-3
No files found.
app/mailers/emails/profile.rb
View file @
8968f6d8
module
Emails
module
Profile
def
new_user_email
(
user_id
,
password
,
token
)
def
new_user_email
(
user_id
,
password
,
token
=
nil
)
@user
=
User
.
find
(
user_id
)
@password
=
password
@target_url
=
user_url
(
@user
)
...
...
spec/mailers/notify_spec.rb
View file @
8968f6d8
...
...
@@ -43,7 +43,7 @@ describe Notify do
let
(
:example_site_path
)
{
root_path
}
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'
...
...
@@ -59,8 +59,12 @@ describe Notify do
should
have_body_text
/
#{
new_user
.
email
}
/
end
it
'contains the new user\'s password'
do
should
have_body_text
/password/
it
'contains the password text'
do
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
it
'includes a link to the site'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment