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
87c39b6d
Commit
87c39b6d
authored
Jan 15, 2017
by
Martin Cabrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added specs for the preservation of the from/to parameter
parent
0413a7ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
spec/controllers/projects/compare_controller_spec.rb
spec/controllers/projects/compare_controller_spec.rb
+21
-1
No files found.
spec/controllers/projects/compare_controller_spec.rb
View file @
87c39b6d
...
...
@@ -65,7 +65,27 @@ describe Projects::CompareController do
expect
(
assigns
(
:commits
)).
to
eq
(
nil
)
end
it
'redirects back to index when params[:from] & params[:to] are empty'
do
it
'redirects back to index when params[:from] is empty and preserves params[:to]'
do
post
(
:create
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
from:
''
,
to:
'master'
)
expect
(
response
).
to
redirect_to
(
namespace_project_compare_index_path
(
project
.
namespace
,
project
,
to:
'master'
))
end
it
'redirects back to index when params[:to] is empty and preserves params[:from]'
do
post
(
:create
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
from:
'master'
,
to:
''
)
expect
(
response
).
to
redirect_to
(
namespace_project_compare_index_path
(
project
.
namespace
,
project
,
from:
'master'
))
end
it
'redirects back to index when params[:from] and params[:to] are empty'
do
post
(
:create
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
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