summaryrefslogtreecommitdiff
path: root/spec/requests/api/merge_requests_spec.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2014-08-20 20:34:55 +0200
committerRobert Schilling <rschilling@student.tugraz.at>2014-08-20 20:34:55 +0200
commit66f6ca0770fa91a3763d45f8c1d2194d95b3c67b (patch)
tree312692802280b57829b5145f8bded20a9ca75914 /spec/requests/api/merge_requests_spec.rb
parent87efd92d8cc378697359012226d2679cab7e1e9e (diff)
downloadgitlab-ce-66f6ca0770fa91a3763d45f8c1d2194d95b3c67b.tar.gz
Fix tests after #7526
Diffstat (limited to 'spec/requests/api/merge_requests_spec.rb')
-rw-r--r--spec/requests/api/merge_requests_spec.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb
index 58cf7f139dc..06a25c5e3a5 100644
--- a/spec/requests/api/merge_requests_spec.rb
+++ b/spec/requests/api/merge_requests_spec.rb
@@ -112,15 +112,16 @@ describe API::API, api: true do
response.status.should == 400
end
- it 'should return 405 on invalid label names' do
+ it 'should return 400 on invalid label names' do
post api("/projects/#{project.id}/merge_requests", user),
title: 'Test merge_request',
source_branch: 'stable',
target_branch: 'master',
author: user,
labels: 'label, ?'
- response.status.should == 405
- json_response['message'].should == 'Label names invalid'
+ response.status.should == 400
+ json_response['message']['labels']['?']['title'].should ==
+ ['is invalid']
end
end
@@ -252,13 +253,13 @@ describe API::API, api: true do
json_response['target_branch'].should == 'wiki'
end
- it 'should return 405 on invalid label names' do
+ it 'should return 400 on invalid label names' do
put api("/projects/#{project.id}/merge_request/#{merge_request.id}",
user),
title: 'new issue',
labels: 'label, ?'
- response.status.should == 405
- json_response['message'].should == 'Label names invalid'
+ response.status.should == 400
+ json_response['message']['labels']['?']['title'].should == ['is invalid']
end
end