summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-12-08 21:49:24 -0800
committerStan Hu <stanhu@gmail.com>2015-12-09 09:50:17 -0800
commit99fd78d6db9ca444853fc9903bdd203f6113b78b (patch)
tree30c9bf059e68f020506e1c0bfc67cc7bea6a8538
parent8d5527007a3cca93dabe7324f8fffbabdc7664d0 (diff)
downloadgitlab-ce-99fd78d6db9ca444853fc9903bdd203f6113b78b.tar.gz
Add spec for invalid options in project creation
-rw-r--r--spec/services/projects/create_service_spec.rb7
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