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
Boxiang Sun
gitlab-ce
Commits
4b98597e
Commit
4b98597e
authored
Nov 08, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for Email confirmation
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
ce1efb56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+24
-0
No files found.
spec/mailers/notify_spec.rb
View file @
4b98597e
...
...
@@ -367,4 +367,28 @@ describe Notify do
should
have_body_text
/
#{
membership
.
human_access
}
/
end
end
describe
'confirmation if email changed'
do
let
(
:example_site_path
)
{
root_path
}
let
(
:user
)
{
create
(
:user
,
email:
'old-email@mail.com'
)
}
before
do
user
.
email
=
"new-email@mail.com"
user
.
save
end
subject
{
ActionMailer
::
Base
.
deliveries
.
last
}
it
'is sent to the new user'
do
should
deliver_to
'new-email@mail.com'
end
it
'has the correct subject'
do
should
have_subject
"Confirmation instructions"
end
it
'includes a link to the site'
do
should
have_body_text
/
#{
example_site_path
}
/
end
end
end
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