summaryrefslogtreecommitdiff
path: root/spec/support/api/boards_shared_examples.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/api/boards_shared_examples.rb')
-rw-r--r--spec/support/api/boards_shared_examples.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/spec/support/api/boards_shared_examples.rb b/spec/support/api/boards_shared_examples.rb
index 943c1f6ffd7..592962ebf7c 100644
--- a/spec/support/api/boards_shared_examples.rb
+++ b/spec/support/api/boards_shared_examples.rb
@@ -88,7 +88,7 @@ shared_examples_for 'group and project boards' do |route_definition, ee = false|
let(:url) { "#{root_url}/#{board.id}/lists" }
it 'creates a new issue board list for labels' do
- post api(url, user), label_id: ux_label.id
+ post api(url, user), params: { label_id: ux_label.id }
expect(response).to have_gitlab_http_status(201)
expect(json_response['label']['name']).to eq(ux_label.title)
@@ -96,13 +96,13 @@ shared_examples_for 'group and project boards' do |route_definition, ee = false|
end
it 'returns 400 when creating a new list if label_id is invalid' do
- post api(url, user), label_id: 23423
+ post api(url, user), params: { label_id: 23423 }
expect(response).to have_gitlab_http_status(400)
end
it 'returns 403 for members with guest role' do
- put api("#{url}/#{test_list.id}", guest), position: 1
+ put api("#{url}/#{test_list.id}", guest), params: { position: 1 }
expect(response).to have_gitlab_http_status(403)
end
@@ -112,23 +112,20 @@ shared_examples_for 'group and project boards' do |route_definition, ee = false|
let(:url) { "#{root_url}/#{board.id}/lists" }
it "updates a list" do
- put api("#{url}/#{test_list.id}", user),
- position: 1
+ put api("#{url}/#{test_list.id}", user), params: { position: 1 }
expect(response).to have_gitlab_http_status(200)
expect(json_response['position']).to eq(1)
end
it "returns 404 error if list id not found" do
- put api("#{url}/44444", user),
- position: 1
+ put api("#{url}/44444", user), params: { position: 1 }
expect(response).to have_gitlab_http_status(404)
end
it "returns 403 for members with guest role" do
- put api("#{url}/#{test_list.id}", guest),
- position: 1
+ put api("#{url}/#{test_list.id}", guest), params: { position: 1 }
expect(response).to have_gitlab_http_status(403)
end