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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a8b655a4
Commit
a8b655a4
authored
Aug 22, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unsubscribe controller spec.
parent
0b9f6c58
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
spec/controllers/unsubscribes_controller_spec.rb
spec/controllers/unsubscribes_controller_spec.rb
+4
-4
No files found.
spec/controllers/unsubscribes_controller_spec.rb
View file @
a8b655a4
...
@@ -5,13 +5,13 @@ describe UnsubscribesController do
...
@@ -5,13 +5,13 @@ describe UnsubscribesController do
describe
"show"
do
describe
"show"
do
it
"responds with success"
do
it
"responds with success"
do
get
:show
,
email:
CGI
.
escape
(
'me@example.com'
)
get
:show
,
email:
Base64
.
urlsafe_encode64
(
'me@example.com'
)
assert_response
:success
assert_response
:success
end
end
it
"behaves the same if email address isn't known in the system"
do
it
"behaves the same if email address isn't known in the system"
do
get
:show
,
email:
CGI
.
escape
(
'i@dont_exists.com'
)
get
:show
,
email:
Base64
.
urlsafe_encode64
(
'i@dont_exists.com'
)
assert_response
:success
assert_response
:success
end
end
...
@@ -19,14 +19,14 @@ describe UnsubscribesController do
...
@@ -19,14 +19,14 @@ describe UnsubscribesController do
describe
"create"
do
describe
"create"
do
it
"unsubscribes the connected user"
do
it
"unsubscribes the connected user"
do
post
:create
,
email:
CGI
.
escape
(
'me@example.com'
)
post
:create
,
email:
Base64
.
urlsafe_encode64
(
'me@example.com'
)
assert
user
.
reload
.
admin_email_unsubscribed_at
assert
user
.
reload
.
admin_email_unsubscribed_at
end
end
# Don't tell if the email does not exists
# Don't tell if the email does not exists
it
"behaves the same if email address isn't known in the system"
do
it
"behaves the same if email address isn't known in the system"
do
post
:create
,
email:
CGI
.
escape
(
'i@dont_exists.com'
)
post
:create
,
email:
Base64
.
urlsafe_encode64
(
'i@dont_exists.com'
)
assert_response
:redirect
assert_response
:redirect
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