summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-05-30 20:54:36 +0800
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-05-30 20:54:36 +0800
commite55e5d6d5a060c97e65c6cb1a3e8d3740b444077 (patch)
tree41fbaf28355aaaadd467d5b102ee4bf5cd172ea6 /spec
parent82ccc8bc120c78efdf68f65d77a72adc5fb48410 (diff)
downloadgitlab-ce-e55e5d6d5a060c97e65c6cb1a3e8d3740b444077.tar.gz
Fix test with hard coded id
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/api/issues/get_project_issues_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/requests/api/issues/get_project_issues_spec.rb b/spec/requests/api/issues/get_project_issues_spec.rb
index a07d7673345..0b0f754ab57 100644
--- a/spec/requests/api/issues/get_project_issues_spec.rb
+++ b/spec/requests/api/issues/get_project_issues_spec.rb
@@ -172,7 +172,9 @@ describe API::Issues do
end
it 'returns 404 when project does not exist' do
- get api('/projects/1000/issues', non_member)
+ max_project_id = Project.maximum(:id).to_i
+
+ get api("/projects/#{max_project_id + 1}/issues", non_member)
expect(response).to have_gitlab_http_status(404)
end