diff options
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 |