diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-01-18 16:16:31 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-11-02 14:20:50 +0300 |
commit | cb3f8510980bf02a1187c40d87df130e517f868d (patch) | |
tree | 48f4d066c76160f6db503686cfabc8c0038a55c9 /spec/lib/gitlab/file_detector_spec.rb | |
parent | c0d30fad978de58da6d78d8fddcfccf602ebfe82 (diff) |
Render index.* like README.* when it's present in a directory
Resolves #18933
Diffstat (limited to 'spec/lib/gitlab/file_detector_spec.rb')
-rw-r--r-- | spec/lib/gitlab/file_detector_spec.rb | 6 |
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 294ec2c2fd6..f0e7bd28ec0 100644 --- a/spec/lib/gitlab/file_detector_spec.rb +++ b/spec/lib/gitlab/file_detector_spec.rb @@ -15,7 +15,11 @@ describe Gitlab::FileDetector do describe '.type_of' do it 'returns the type of a README file' do - expect(described_class.type_of('README.md')).to eq(:readme) + %w(README readme INDEX index).each do |filename| + %w(.md .adoc).each do |extname| + expect(described_class.type_of(filename + extname)).to eq(:readme) + end + end end it 'returns nil for a README file in a directory' do |