summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-06-14 13:24:17 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-06-19 09:35:15 +0200
commitda8419a1ba1cbcc6c5c6365c99419cf17ab2d497 (patch)
tree30d69a90829d9504bfa1c72f3f7b25de4656b698 /spec/lib/gitlab
parent0f18d4896c63ad91074f1963737f5ba4458031f0 (diff)
downloadgitlab-ce-da8419a1ba1cbcc6c5c6365c99419cf17ab2d497.tar.gz
License detection happens soley through Gitaly now
Migration: https://gitlab.com/gitlab-org/gitaly/issues/1026 Conflicts: lib/gitlab/git/repository.rb
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/git/repository_spec.rb28
1 files changed, 9 insertions, 19 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb
index 5bae99101e6..f0e7e390f8b 100644
--- a/spec/lib/gitlab/git/repository_spec.rb
+++ b/spec/lib/gitlab/git/repository_spec.rb
@@ -1727,31 +1727,21 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
describe '#license_short_name' do
- shared_examples 'acquiring the Licensee license key' do
- subject { repository.license_short_name }
+ subject { repository.license_short_name }
- context 'when no license file can be found' do
- let(:project) { create(:project, :repository) }
- let(:repository) { project.repository.raw_repository }
-
- before do
- project.repository.delete_file(project.owner, 'LICENSE', message: 'remove license', branch_name: 'master')
- end
-
- it { is_expected.to be_nil }
- end
+ context 'when no license file can be found' do
+ let(:project) { create(:project, :repository) }
+ let(:repository) { project.repository.raw_repository }
- context 'when an mit license is found' do
- it { is_expected.to eq('mit') }
+ before do
+ project.repository.delete_file(project.owner, 'LICENSE', message: 'remove license', branch_name: 'master')
end
- end
- context 'when gitaly is enabled' do
- it_behaves_like 'acquiring the Licensee license key'
+ it { is_expected.to be_nil }
end
- context 'when gitaly is disabled', :disable_gitaly do
- it_behaves_like 'acquiring the Licensee license key'
+ context 'when an mit license is found' do
+ it { is_expected.to eq('mit') }
end
end