Commit aa61dba0 authored by Rémy Coutable's avatar Rémy Coutable

Ensure we use a big-enough ID for resources that aren't supposed to exist

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 70b61a3e
...@@ -1207,7 +1207,7 @@ describe API::V3::Issues do ...@@ -1207,7 +1207,7 @@ describe API::V3::Issues do
context 'when issue does not exist' do context 'when issue does not exist' do
it 'returns 404 when trying to move an issue' do it 'returns 404 when trying to move an issue' do
delete v3_api("/projects/#{project.id}/issues/123", user) delete v3_api("/projects/#{project.id}/issues/999999", user)
expect(response).to have_gitlab_http_status(404) expect(response).to have_gitlab_http_status(404)
end end
...@@ -1256,7 +1256,7 @@ describe API::V3::Issues do ...@@ -1256,7 +1256,7 @@ describe API::V3::Issues do
context 'when issue does not exist' do context 'when issue does not exist' do
it 'returns 404 when trying to move an issue' do it 'returns 404 when trying to move an issue' do
post v3_api("/projects/#{project.id}/issues/123/move", user), post v3_api("/projects/#{project.id}/issues/999999/move", user),
to_project_id: target_project.id to_project_id: target_project.id
expect(response).to have_gitlab_http_status(404) expect(response).to have_gitlab_http_status(404)
...@@ -1266,7 +1266,7 @@ describe API::V3::Issues do ...@@ -1266,7 +1266,7 @@ describe API::V3::Issues do
context 'when source project does not exist' do context 'when source project does not exist' do
it 'returns 404 when trying to move an issue' do it 'returns 404 when trying to move an issue' do
post v3_api("/projects/123/issues/#{issue.id}/move", user), post v3_api("/projects/999999/issues/#{issue.id}/move", user),
to_project_id: target_project.id to_project_id: target_project.id
expect(response).to have_gitlab_http_status(404) expect(response).to have_gitlab_http_status(404)
...@@ -1277,7 +1277,7 @@ describe API::V3::Issues do ...@@ -1277,7 +1277,7 @@ describe API::V3::Issues do
context 'when target project does not exist' do context 'when target project does not exist' do
it 'returns 404 when trying to move an issue' do it 'returns 404 when trying to move an issue' do
post v3_api("/projects/#{project.id}/issues/#{issue.id}/move", user), post v3_api("/projects/#{project.id}/issues/#{issue.id}/move", user),
to_project_id: 123 to_project_id: 999999
expect(response).to have_gitlab_http_status(404) expect(response).to have_gitlab_http_status(404)
end end
...@@ -1299,7 +1299,7 @@ describe API::V3::Issues do ...@@ -1299,7 +1299,7 @@ describe API::V3::Issues do
end end
it 'returns 404 if the issue is not found' do it 'returns 404 if the issue is not found' do
post v3_api("/projects/#{project.id}/issues/123/subscription", user) post v3_api("/projects/#{project.id}/issues/999999/subscription", user)
expect(response).to have_gitlab_http_status(404) expect(response).to have_gitlab_http_status(404)
end end
...@@ -1326,7 +1326,7 @@ describe API::V3::Issues do ...@@ -1326,7 +1326,7 @@ describe API::V3::Issues do
end end
it 'returns 404 if the issue is not found' do it 'returns 404 if the issue is not found' do
delete v3_api("/projects/#{project.id}/issues/123/subscription", user) delete v3_api("/projects/#{project.id}/issues/999999/subscription", user)
expect(response).to have_gitlab_http_status(404) expect(response).to have_gitlab_http_status(404)
end end
......
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