BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
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