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
70decdc2
Commit
70decdc2
authored
May 20, 2019
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs to match route changes
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c4c25946
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
24 deletions
+25
-24
spec/presenters/merge_request_presenter_spec.rb
spec/presenters/merge_request_presenter_spec.rb
+2
-2
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+21
-20
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+1
-1
spec/views/help/index.html.haml_spec.rb
spec/views/help/index.html.haml_spec.rb
+1
-1
No files found.
spec/presenters/merge_request_presenter_spec.rb
View file @
70decdc2
...
...
@@ -403,7 +403,7 @@ describe MergeRequestPresenter do
allow
(
resource
).
to
receive
(
:source_branch_exists?
)
{
true
}
is_expected
.
to
eq
(
"/
#{
resource
.
source_project
.
full_path
}
/branches/
#{
resource
.
source_branch
}
"
)
.
to
eq
(
"/
#{
resource
.
source_project
.
full_path
}
/
-/
branches/
#{
resource
.
source_branch
}
"
)
end
end
...
...
@@ -426,7 +426,7 @@ describe MergeRequestPresenter do
allow
(
resource
).
to
receive
(
:target_branch_exists?
)
{
true
}
is_expected
.
to
eq
(
"/
#{
resource
.
source_project
.
full_path
}
/branches/
#{
resource
.
target_branch
}
"
)
.
to
eq
(
"/
#{
resource
.
source_project
.
full_path
}
/
-/
branches/
#{
resource
.
target_branch
}
"
)
end
end
...
...
spec/routing/project_routing_spec.rb
View file @
70decdc2
...
...
@@ -204,25 +204,25 @@ describe 'project routing' do
describe
Projects
::
BranchesController
,
'routing'
do
it
'to #branches'
do
expect
(
get
(
'/gitlab/gitlabhq/branches'
)).
to
route_to
(
'projects/branches#index'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
expect
(
delete
(
'/gitlab/gitlabhq/branches/feature%2345'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature#45'
)
expect
(
delete
(
'/gitlab/gitlabhq/branches/feature%2B45'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature+45'
)
expect
(
delete
(
'/gitlab/gitlabhq/branches/feature@45'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature@45'
)
expect
(
delete
(
'/gitlab/gitlabhq/branches/feature%2345/foo/bar/baz'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature#45/foo/bar/baz'
)
expect
(
delete
(
'/gitlab/gitlabhq/branches/feature%2B45/foo/bar/baz'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature+45/foo/bar/baz'
)
expect
(
delete
(
'/gitlab/gitlabhq/branches/feature@45/foo/bar/baz'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature@45/foo/bar/baz'
)
expect
(
get
(
'/gitlab/gitlabhq/
-/
branches'
)).
to
route_to
(
'projects/branches#index'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
branches/feature%2345'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature#45'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
branches/feature%2B45'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature+45'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
branches/feature@45'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature@45'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
branches/feature%2345/foo/bar/baz'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature#45/foo/bar/baz'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
branches/feature%2B45/foo/bar/baz'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature+45/foo/bar/baz'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
branches/feature@45/foo/bar/baz'
)).
to
route_to
(
'projects/branches#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature@45/foo/bar/baz'
)
end
end
describe
Projects
::
TagsController
,
'routing'
do
it
'to #tags'
do
expect
(
get
(
'/gitlab/gitlabhq/tags'
)).
to
route_to
(
'projects/tags#index'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
expect
(
delete
(
'/gitlab/gitlabhq/tags/feature%2345'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature#45'
)
expect
(
delete
(
'/gitlab/gitlabhq/tags/feature%2B45'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature+45'
)
expect
(
delete
(
'/gitlab/gitlabhq/tags/feature@45'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature@45'
)
expect
(
delete
(
'/gitlab/gitlabhq/tags/feature%2345/foo/bar/baz'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature#45/foo/bar/baz'
)
expect
(
delete
(
'/gitlab/gitlabhq/tags/feature%2B45/foo/bar/baz'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature+45/foo/bar/baz'
)
expect
(
delete
(
'/gitlab/gitlabhq/tags/feature@45/foo/bar/baz'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature@45/foo/bar/baz'
)
expect
(
get
(
'/gitlab/gitlabhq/
-/
tags'
)).
to
route_to
(
'projects/tags#index'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
tags/feature%2345'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature#45'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
tags/feature%2B45'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature+45'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
tags/feature@45'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature@45'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
tags/feature%2345/foo/bar/baz'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature#45/foo/bar/baz'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
tags/feature%2B45/foo/bar/baz'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature+45/foo/bar/baz'
)
expect
(
delete
(
'/gitlab/gitlabhq/
-/
tags/feature@45/foo/bar/baz'
)).
to
route_to
(
'projects/tags#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'feature@45/foo/bar/baz'
)
end
end
...
...
@@ -247,6 +247,7 @@ describe 'project routing' do
it_behaves_like
'RESTful project resources'
do
let
(
:actions
)
{
[
:index
,
:create
,
:destroy
]
}
let
(
:controller
)
{
'protected_branches'
}
let
(
:controller_path
)
{
'/-/protected_branches'
}
end
end
...
...
@@ -592,17 +593,17 @@ describe 'project routing' do
describe
Projects
::
NetworkController
,
'routing'
do
it
'to #show'
do
expect
(
get
(
'/gitlab/gitlabhq/network/master'
)).
to
route_to
(
'projects/network#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master'
)
expect
(
get
(
'/gitlab/gitlabhq/network/ends-with.json'
)).
to
route_to
(
'projects/network#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'ends-with.json'
)
expect
(
get
(
'/gitlab/gitlabhq/network/master?format=json'
)).
to
route_to
(
'projects/network#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master'
,
format:
'json'
)
expect
(
get
(
'/gitlab/gitlabhq/
-/
network/master'
)).
to
route_to
(
'projects/network#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master'
)
expect
(
get
(
'/gitlab/gitlabhq/
-/
network/ends-with.json'
)).
to
route_to
(
'projects/network#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'ends-with.json'
)
expect
(
get
(
'/gitlab/gitlabhq/
-/
network/master?format=json'
)).
to
route_to
(
'projects/network#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master'
,
format:
'json'
)
end
end
describe
Projects
::
GraphsController
,
'routing'
do
it
'to #show'
do
expect
(
get
(
'/gitlab/gitlabhq/graphs/master'
)).
to
route_to
(
'projects/graphs#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master'
)
expect
(
get
(
'/gitlab/gitlabhq/graphs/ends-with.json'
)).
to
route_to
(
'projects/graphs#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'ends-with.json'
)
expect
(
get
(
'/gitlab/gitlabhq/graphs/master?format=json'
)).
to
route_to
(
'projects/graphs#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master'
,
format:
'json'
)
expect
(
get
(
'/gitlab/gitlabhq/
-/
graphs/master'
)).
to
route_to
(
'projects/graphs#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master'
)
expect
(
get
(
'/gitlab/gitlabhq/
-/
graphs/ends-with.json'
)).
to
route_to
(
'projects/graphs#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'ends-with.json'
)
expect
(
get
(
'/gitlab/gitlabhq/
-/
graphs/master?format=json'
)).
to
route_to
(
'projects/graphs#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master'
,
format:
'json'
)
end
end
...
...
spec/services/system_note_service_spec.rb
View file @
70decdc2
...
...
@@ -132,7 +132,7 @@ describe SystemNoteService do
end
it
'sets the note text'
do
link
=
"http://localhost/
#{
project
.
full_path
}
/tags/
#{
tag_name
}
"
link
=
"http://localhost/
#{
project
.
full_path
}
/
-/
tags/
#{
tag_name
}
"
expect
(
subject
.
note
).
to
eq
"tagged commit
#{
noteable
.
sha
}
to [`
#{
tag_name
}
`](
#{
link
}
)"
end
...
...
spec/views/help/index.html.haml_spec.rb
View file @
70decdc2
...
...
@@ -31,7 +31,7 @@ describe 'help/index' do
render
expect
(
rendered
).
to
match
'8.0.2'
expect
(
rendered
).
to
have_link
(
'8.0.2'
,
href:
%r{https://gitlab.com/gitlab-org/gitlab-(ce|ee)/tags/v8.0.2}
)
expect
(
rendered
).
to
have_link
(
'8.0.2'
,
href:
%r{https://gitlab.com/gitlab-org/gitlab-(ce|ee)/
-/
tags/v8.0.2}
)
end
it
'shows a link to the commit for pre-releases'
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