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
d53755da
Commit
d53755da
authored
Jan 02, 2019
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deprecation: Using positional arguments in integration tests
parent
6a8b89d9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
9 deletions
+14
-9
changelogs/unreleased/deprecated-positional-spec-arguments.yml
...elogs/unreleased/deprecated-positional-spec-arguments.yml
+5
-0
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+4
-4
spec/controllers/projects/snippets_controller_spec.rb
spec/controllers/projects/snippets_controller_spec.rb
+1
-1
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+1
-1
spec/controllers/snippets_controller_spec.rb
spec/controllers/snippets_controller_spec.rb
+3
-3
No files found.
changelogs/unreleased/deprecated-positional-spec-arguments.yml
0 → 100644
View file @
d53755da
---
title
:
'
Fix
deprecation:
Using
positional
arguments
in
integration
tests'
merge_request
:
24110
author
:
Jasper Maes
type
:
other
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
d53755da
...
@@ -950,7 +950,7 @@ describe Projects::MergeRequestsController do
...
@@ -950,7 +950,7 @@ describe Projects::MergeRequestsController do
end
end
it
'returns 200'
do
it
'returns 200'
do
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
get
:discussions
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
}
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
response
.
status
).
to
eq
(
200
)
end
end
...
@@ -969,7 +969,7 @@ describe Projects::MergeRequestsController do
...
@@ -969,7 +969,7 @@ describe Projects::MergeRequestsController do
expect
(
collection
).
to
receive
(
:find_by_id
).
with
(
note_diff_file
.
id
).
and_call_original
expect
(
collection
).
to
receive
(
:find_by_id
).
with
(
note_diff_file
.
id
).
and_call_original
end
end
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
get
:discussions
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
}
end
end
end
end
...
@@ -986,7 +986,7 @@ describe Projects::MergeRequestsController do
...
@@ -986,7 +986,7 @@ describe Projects::MergeRequestsController do
expect
(
collection
).
to
receive
(
:find_by_id
).
with
(
note_diff_file
.
id
).
and_call_original
expect
(
collection
).
to
receive
(
:find_by_id
).
with
(
note_diff_file
.
id
).
and_call_original
end
end
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
get
:discussions
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
}
end
end
it
'does not preload highlights when diff note is resolved'
do
it
'does not preload highlights when diff note is resolved'
do
...
@@ -999,7 +999,7 @@ describe Projects::MergeRequestsController do
...
@@ -999,7 +999,7 @@ describe Projects::MergeRequestsController do
expect
(
collection
).
to
receive
(
:find_by_id
).
with
(
note_diff_file
.
id
).
and_call_original
expect
(
collection
).
to
receive
(
:find_by_id
).
with
(
note_diff_file
.
id
).
and_call_original
end
end
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
get
:discussions
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
}
end
end
end
end
end
end
...
...
spec/controllers/projects/snippets_controller_spec.rb
View file @
d53755da
...
@@ -385,7 +385,7 @@ describe Projects::SnippetsController do
...
@@ -385,7 +385,7 @@ describe Projects::SnippetsController do
before
do
before
do
sign_in
(
user
)
sign_in
(
user
)
get
:show
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
project_snippet
.
to_param
,
format: :js
get
:show
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
project_snippet
.
to_param
}
,
format: :js
end
end
context
'when snippet is private'
do
context
'when snippet is private'
do
...
...
spec/controllers/projects_controller_spec.rb
View file @
d53755da
...
@@ -667,7 +667,7 @@ describe ProjectsController do
...
@@ -667,7 +667,7 @@ describe ProjectsController do
project
.
add_guest
(
user
)
project
.
add_guest
(
user
)
sign_in
(
user
)
sign_in
(
user
)
get
:refs
,
namespace_id:
project
.
namespace
,
id:
project
get
:refs
,
params:
{
namespace_id:
project
.
namespace
,
id:
project
}
expect
(
response
).
to
have_gitlab_http_status
(
404
)
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
end
...
...
spec/controllers/snippets_controller_spec.rb
View file @
d53755da
...
@@ -82,7 +82,7 @@ describe SnippetsController do
...
@@ -82,7 +82,7 @@ describe SnippetsController do
end
end
it
'responds with status 404 when embeddable content is requested'
do
it
'responds with status 404 when embeddable content is requested'
do
get
:show
,
id:
personal_snippet
.
to_param
,
format: :js
get
:show
,
params:
{
id:
personal_snippet
.
to_param
}
,
format: :js
expect
(
response
).
to
have_gitlab_http_status
(
404
)
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
end
...
@@ -114,7 +114,7 @@ describe SnippetsController do
...
@@ -114,7 +114,7 @@ describe SnippetsController do
end
end
it
'responds with status 404 when embeddable content is requested'
do
it
'responds with status 404 when embeddable content is requested'
do
get
:show
,
id:
personal_snippet
.
to_param
,
format: :js
get
:show
,
params:
{
id:
personal_snippet
.
to_param
}
,
format: :js
expect
(
response
).
to
have_gitlab_http_status
(
404
)
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
end
...
@@ -145,7 +145,7 @@ describe SnippetsController do
...
@@ -145,7 +145,7 @@ describe SnippetsController do
end
end
it
'responds with status 200 when embeddable content is requested'
do
it
'responds with status 200 when embeddable content is requested'
do
get
:show
,
id:
personal_snippet
.
to_param
,
format: :js
get
:show
,
params:
{
id:
personal_snippet
.
to_param
}
,
format: :js
expect
(
assigns
(
:snippet
)).
to
eq
(
personal_snippet
)
expect
(
assigns
(
:snippet
)).
to
eq
(
personal_snippet
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
...
...
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