Commit f1d7c416 authored by Timothy Andrew's avatar Timothy Andrew

EE-specific changes for #28251.

Specs that are EE-only need to be updated to use IIDs instead of IDs
parent 07d76aac
......@@ -1180,7 +1180,7 @@ describe API::Issues, api: true do
describe 'PUT /projects/:id/issues/:issue_id to update weight' do
it 'updates an issue with no weight' do
put api("/projects/#{project.id}/issues/#{issue.id}", user), weight: 5
put api("/projects/#{project.id}/issues/#{issue.iid}", user), weight: 5
expect(response).to have_http_status(200)
expect(json_response['weight']).to eq(5)
......@@ -1189,21 +1189,21 @@ describe API::Issues, api: true do
it 'removes a weight from an issue' do
weighted_issue = create(:issue, project: project, weight: 2)
put api("/projects/#{project.id}/issues/#{weighted_issue.id}", user), weight: nil
put api("/projects/#{project.id}/issues/#{weighted_issue.iid}", user), weight: nil
expect(response).to have_http_status(200)
expect(json_response['weight']).to be_nil
end
it 'returns 400 if weight is less than minimum weight' do
put api("/projects/#{project.id}/issues/#{issue.id}", user), weight: -1
put api("/projects/#{project.id}/issues/#{issue.iid}", user), weight: -1
expect(response).to have_http_status(400)
expect(json_response['error']).to eq('weight does not have a valid value')
end
it 'returns 400 if weight is more than maximum weight' do
put api("/projects/#{project.id}/issues/#{issue.id}", user), weight: 10
put api("/projects/#{project.id}/issues/#{issue.iid}", user), weight: 10
expect(response).to have_http_status(400)
expect(json_response['error']).to eq('weight does not have a valid value')
......
......@@ -574,7 +574,7 @@ describe API::MergeRequests, api: true do
it "updates the MR's squash attribute" do
expect do
put api("/projects/#{project.id}/merge_requests/#{merge_request.id}/merge", user), squash: true
put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), squash: true
end.to change { merge_request.reload.squash }
expect(response).to have_http_status(200)
......@@ -633,7 +633,7 @@ describe API::MergeRequests, api: true do
end
it "updates squash and returns merge_request" do
put api("/projects/#{project.id}/merge_requests/#{merge_request.id}", user), squash: true
put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), squash: true
expect(response).to have_http_status(200)
expect(json_response['squash']).to be_truthy
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment