diff options
Diffstat (limited to 'spec/requests/api/v3/github_spec.rb')
-rw-r--r-- | spec/requests/api/v3/github_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/requests/api/v3/github_spec.rb b/spec/requests/api/v3/github_spec.rb index 4100b246218..255f53e4c7c 100644 --- a/spec/requests/api/v3/github_spec.rb +++ b/spec/requests/api/v3/github_spec.rb @@ -472,6 +472,17 @@ RSpec.describe API::V3::Github do expect(response).to have_gitlab_http_status(:ok) end + + context 'when the project has no repository', :aggregate_failures do + let_it_be(:project) { create(:project, creator: user) } + + it 'returns an empty collection response' do + jira_get v3_api("/repos/#{project.namespace.path}/#{project.path}/branches", user) + + expect(response).to have_gitlab_http_status(:ok) + expect(json_response).to be_empty + end + end end context 'unauthenticated' do |