From 99fd78d6db9ca444853fc9903bdd203f6113b78b Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 8 Dec 2015 21:49:24 -0800 Subject: [PATCH] Add spec for invalid options in project creation --- spec/services/projects/create_service_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) 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