diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-12-18 01:52:17 +0300 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-12-19 02:04:31 +0300 |
commit | b44a2c801a64fb282cea794871fcfcf81e4ec539 (patch) | |
tree | 32e699b6efa548048abe11f29f84e85e3d2a034f /spec/requests/api/notification_settings_spec.rb | |
parent | 5d68c23792e87e710877e4baf57605bcf11a6cb5 (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/notification_settings_spec.rb')
-rw-r--r-- | spec/requests/api/notification_settings_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/requests/api/notification_settings_spec.rb b/spec/requests/api/notification_settings_spec.rb index 3273cd26690..4ed667ad0dc 100644 --- a/spec/requests/api/notification_settings_spec.rb +++ b/spec/requests/api/notification_settings_spec.rb @@ -20,7 +20,7 @@ describe API::NotificationSettings do let(:email) { create(:email, user: user) } it "updates global notification settings for the current user" do - put api("/notification_settings", user), { level: 'watch', notification_email: email.email } + put api("/notification_settings", user), params: { level: 'watch', notification_email: email.email } expect(response).to have_gitlab_http_status(200) expect(json_response['notification_email']).to eq(email.email) @@ -31,7 +31,7 @@ describe API::NotificationSettings do describe "PUT /notification_settings" do it "fails on non-user email address" do - put api("/notification_settings", user), { notification_email: 'invalid@example.com' } + put api("/notification_settings", user), params: { notification_email: 'invalid@example.com' } expect(response).to have_gitlab_http_status(400) end @@ -49,7 +49,7 @@ describe API::NotificationSettings do describe "PUT /groups/:id/notification_settings" do it "updates group level notification settings for the current user" do - put api("/groups/#{group.id}/notification_settings", user), { level: 'watch' } + put api("/groups/#{group.id}/notification_settings", user), params: { level: 'watch' } expect(response).to have_gitlab_http_status(200) expect(json_response['level']).to eq(user.reload.notification_settings_for(group).level) @@ -68,7 +68,7 @@ describe API::NotificationSettings do describe "PUT /projects/:id/notification_settings" do it "updates project level notification settings for the current user" do - put api("/projects/#{project.id}/notification_settings", user), { level: 'custom', new_note: true } + put api("/projects/#{project.id}/notification_settings", user), params: { level: 'custom', new_note: true } expect(response).to have_gitlab_http_status(200) expect(json_response['level']).to eq(user.reload.notification_settings_for(project).level) @@ -79,7 +79,7 @@ describe API::NotificationSettings do describe "PUT /projects/:id/notification_settings" do it "fails on invalid level" do - put api("/projects/#{project.id}/notification_settings", user), { level: 'invalid' } + put api("/projects/#{project.id}/notification_settings", user), params: { level: 'invalid' } expect(response).to have_gitlab_http_status(400) end |