diff options
Diffstat (limited to 'spec/requests/api/branches_spec.rb')
-rw-r--r-- | spec/requests/api/branches_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb index 97f880dd3cd..f2dc5b1c045 100644 --- a/spec/requests/api/branches_spec.rb +++ b/spec/requests/api/branches_spec.rb @@ -16,6 +16,7 @@ describe API::Branches do before do project.add_maintainer(user) + project.repository.add_branch(user, 'ends-with.txt', branch_sha) end describe "GET /projects/:id/repository/branches" do @@ -240,6 +241,12 @@ describe API::Branches do it_behaves_like 'repository branch' end + context 'when branch contains dot txt' do + let(:branch_name) { project.repository.find_branch('ends-with.txt').name } + + it_behaves_like 'repository branch' + end + context 'when branch contains a slash' do let(:branch_name) { branch_with_slash.name } @@ -623,7 +630,7 @@ describe API::Branches do post api(route, user), params: { branch: 'new_design3', ref: 'foo' } expect(response).to have_gitlab_http_status(:bad_request) - expect(json_response['message']).to eq('Invalid reference name: new_design3') + expect(json_response['message']).to eq('Invalid reference name: foo') end end |