diff options
author | Stan Hu <stanhu@gmail.com> | 2015-12-09 08:49:24 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-12-09 20:50:17 +0300 |
commit | 99fd78d6db9ca444853fc9903bdd203f6113b78b (patch) | |
tree | 30c9bf059e68f020506e1c0bfc67cc7bea6a8538 /spec/services | |
parent | 8d5527007a3cca93dabe7324f8fffbabdc7664d0 (diff) |
Add spec for invalid options in project creation
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/projects/create_service_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb index 2d8c316e38d..5d0b18558b1 100644 --- a/spec/services/projects/create_service_spec.rb +++ b/spec/services/projects/create_service_spec.rb @@ -49,6 +49,13 @@ describe Projects::CreateService, services: true do it { expect(@project.namespace).to eq(@group) } end + context 'error handling' do + it 'handles invalid options' do + @opts.merge!({ default_branch: 'master' } ) + expect(create_project(@user, @opts)).to eq(nil) + end + end + context 'wiki_enabled creates repository directory' do context 'wiki_enabled true creates wiki repository directory' do before do |