Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2018-12-18 01:52:17 +0300
committerblackst0ne <blackst0ne.ru@gmail.com>2018-12-19 02:04:31 +0300
commitb44a2c801a64fb282cea794871fcfcf81e4ec539 (patch)
tree32e699b6efa548048abe11f29f84e85e3d2a034f /spec/requests/api/suggestions_spec.rb
parent5d68c23792e87e710877e4baf57605bcf11a6cb5 (diff)
Update specs to rails5 format
Updates specs to use new rails5 format. The old format: `get :show, { some: params }, { some: headers }` The new format: `get :show, params: { some: params }, headers: { some: headers }`
Diffstat (limited to 'spec/requests/api/suggestions_spec.rb')
-rw-r--r--spec/requests/api/suggestions_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/requests/api/suggestions_spec.rb b/spec/requests/api/suggestions_spec.rb
index 8e9f737fbd5..3c2842e5725 100644
--- a/spec/requests/api/suggestions_spec.rb
+++ b/spec/requests/api/suggestions_spec.rb
@@ -38,7 +38,7 @@ describe API::Suggestions do
it 'returns 200 with json content' do
project.add_maintainer(user)
- put api(url, user), id: suggestion.id
+ put api(url, user), params: { id: suggestion.id }
expect(response).to have_gitlab_http_status(200)
expect(json_response)
@@ -56,7 +56,7 @@ describe API::Suggestions do
it 'returns 400 with json content' do
project.add_maintainer(user)
- put api(url, user), id: suggestion.id
+ put api(url, user), params: { id: suggestion.id }
expect(response).to have_gitlab_http_status(400)
expect(json_response).to eq({ 'message' => 'Suggestion is not appliable' })
@@ -73,7 +73,7 @@ describe API::Suggestions do
it 'returns 403 with json content' do
project.add_reporter(user)
- put api(url, user), id: suggestion.id
+ put api(url, user), params: { id: suggestion.id }
expect(response).to have_gitlab_http_status(403)
expect(json_response).to eq({ 'message' => '403 Forbidden' })