Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJ.D. Bean <jonathandbean@gmail.com>2018-09-06 15:36:19 +0300
committerRémy Coutable <remy@rymai.me>2018-09-06 15:36:19 +0300
commit643c6f31e5f0ad4ba7b5ff1b9c3d1af2dc93cd57 (patch)
treee327496ee6c5a45480625a4ccb78c6e59c39ad32 /spec
parent4a14ff5bcefe170d3f3ff9885fff21500442fac6 (diff)
Recognize 'UNLICENSE' license files
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/file_detector_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/gitlab/file_detector_spec.rb b/spec/lib/gitlab/file_detector_spec.rb
index 8e524f9b05a..9e351368b22 100644
--- a/spec/lib/gitlab/file_detector_spec.rb
+++ b/spec/lib/gitlab/file_detector_spec.rb
@@ -29,11 +29,15 @@ describe Gitlab::FileDetector do
end
it 'returns the type of a license file' do
- %w(LICENSE LICENCE COPYING).each do |file|
+ %w(LICENSE LICENCE COPYING UNLICENSE UNLICENCE).each do |file|
expect(described_class.type_of(file)).to eq(:license)
end
end
+ it 'returns nil for an UNCOPYING file' do
+ expect(described_class.type_of('UNCOPYING')).to be_nil
+ end
+
it 'returns the type of a version file' do
expect(described_class.type_of('VERSION')).to eq(:version)
end