diff options
Diffstat (limited to 'spec/lib/gitlab/gl_repository_spec.rb')
-rw-r--r-- | spec/lib/gitlab/gl_repository_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/lib/gitlab/gl_repository_spec.rb b/spec/lib/gitlab/gl_repository_spec.rb index 3290bef8aa5..3cfc4c2a132 100644 --- a/spec/lib/gitlab/gl_repository_spec.rb +++ b/spec/lib/gitlab/gl_repository_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' describe ::Gitlab::GlRepository do describe '.parse' do - set(:project) { create(:project, :repository) } + let_it_be(:project) { create(:project, :repository) } it 'parses a project gl_repository' do expect(described_class.parse("project-#{project.id}")).to eq([project, Gitlab::GlRepository::PROJECT]) @@ -14,8 +14,12 @@ describe ::Gitlab::GlRepository do expect(described_class.parse("wiki-#{project.id}")).to eq([project, Gitlab::GlRepository::WIKI]) end - it 'throws an argument error on an invalid gl_repository' do + it 'throws an argument error on an invalid gl_repository type' do expect { described_class.parse("badformat-#{project.id}") }.to raise_error(ArgumentError) end + + it 'throws an argument error on an invalid gl_repository id' do + expect { described_class.parse("project-foo") }.to raise_error(ArgumentError) + end end end |