diff options
author | James Lopez <james@jameslopez.es> | 2018-11-15 13:00:12 +0000 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-11-15 13:00:12 +0000 |
commit | 5e6663a21a7f9c141ee6d52353e2f6bb36707bce (patch) | |
tree | 9c8db9857bc5d139ba40b1e69c2e3b99f1d4c486 /spec/lib/gitlab/file_detector_spec.rb | |
parent | 5cda92b1cf624f8aa9f33d38b6699b9ae9fc7f8e (diff) | |
download | gitlab-ce-5e6663a21a7f9c141ee6d52353e2f6bb36707bce.tar.gz |
Update spec to use PLAIN_FILENAMES constant
Diffstat (limited to 'spec/lib/gitlab/file_detector_spec.rb')
-rw-r--r-- | spec/lib/gitlab/file_detector_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/lib/gitlab/file_detector_spec.rb b/spec/lib/gitlab/file_detector_spec.rb index b2f8d5c4558..462cc113a95 100644 --- a/spec/lib/gitlab/file_detector_spec.rb +++ b/spec/lib/gitlab/file_detector_spec.rb @@ -15,9 +15,10 @@ describe Gitlab::FileDetector do describe '.type_of' do it 'returns the type of a README file' do + filenames = Gitlab::MarkupHelper::PLAIN_FILENAMES + Gitlab::MarkupHelper::PLAIN_FILENAMES.map(&:upcase) extensions = Gitlab::MarkupHelper::EXTENSIONS + Gitlab::MarkupHelper::EXTENSIONS.map(&:upcase) - %w[README readme INDEX index].each do |filename| + filenames.each do |filename| expect(described_class.type_of(filename)).to eq(:readme) extensions.each do |extname| expect(described_class.type_of(filename + extname)).to eq(:readme) |