diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2014-08-18 00:25:49 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2014-08-18 00:25:49 +0200 |
commit | 4ca3f64719f924a483b19ba921f41ac06c3b6a63 (patch) | |
tree | 2b7d3d314dc7a417509c983a9a93e793aa0fefb6 /spec/requests/api/labels_spec.rb | |
parent | 27cf081e1b0b1df1661aaf0ae6b60b05ef3eb8d8 (diff) | |
download | gitlab-ce-4ca3f64719f924a483b19ba921f41ac06c3b6a63.tar.gz |
Fix labels return code
Diffstat (limited to 'spec/requests/api/labels_spec.rb')
-rw-r--r-- | spec/requests/api/labels_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/requests/api/labels_spec.rb b/spec/requests/api/labels_spec.rb index b06b353333d..cd1b84c53c9 100644 --- a/spec/requests/api/labels_spec.rb +++ b/spec/requests/api/labels_spec.rb @@ -42,19 +42,19 @@ describe API::API, api: true do response.status.should == 400 end - it 'should return 405 for invalid color' do + it 'should return 400 for invalid color' do post api("/projects/#{project.id}/labels", user), name: 'Foo', color: '#FFAA' - response.status.should == 405 + response.status.should == 400 json_response['message'].should == 'Color is invalid' end - it 'should return 405 for invalid name' do + it 'should return 400 for invalid name' do post api("/projects/#{project.id}/labels", user), name: '?', color: '#FFAABB' - response.status.should == 405 + response.status.should == 400 json_response['message'].should == 'Title is invalid' end @@ -131,20 +131,20 @@ describe API::API, api: true do response.status.should == 400 end - it 'should return 405 for invalid name' do + it 'should return 400 for invalid name' do put api("/projects/#{project.id}/labels", user), name: 'label1', new_name: '?', color: '#FFFFFF' - response.status.should == 405 + response.status.should == 400 json_response['message'].should == 'Title is invalid' end - it 'should return 405 for invalid name' do + it 'should return 400 for invalid name' do put api("/projects/#{project.id}/labels", user), name: 'label1', color: '#FF' - response.status.should == 405 + response.status.should == 400 json_response['message'].should == 'Color is invalid' end end |