diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-20 18:09:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-20 18:09:17 +0300 |
commit | 194b499aa8e26df26ff70a1e1ce0396587bd5243 (patch) | |
tree | c873ac9c3096faf4a5da43d6670107461da2a7d7 /spec/lib/gitlab/file_detector_spec.rb | |
parent | 43b4b3e2d2ddebc0a89b94a8251c162ec5719780 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/file_detector_spec.rb')
-rw-r--r-- | spec/lib/gitlab/file_detector_spec.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/lib/gitlab/file_detector_spec.rb b/spec/lib/gitlab/file_detector_spec.rb index 3972bd24e80..5bf70ef898a 100644 --- a/spec/lib/gitlab/file_detector_spec.rb +++ b/spec/lib/gitlab/file_detector_spec.rb @@ -96,14 +96,25 @@ describe Gitlab::FileDetector do 'swagger.yml', 'swagger.yaml', 'swagger.json', 'gitlab_swagger.yml', 'openapi_gitlab.yml', 'OpenAPI.YML', 'openapi.Yaml', 'openapi.JSON', - 'openapi.gitlab.yml', 'gitlab.openapi.yml' + 'openapi.gitlab.yml', 'gitlab.openapi.yml', + 'attention/openapi.yml', 'attention/swagger.yml', + 'attention/gitlab_swagger.yml', 'attention/openapi_gitlab.yml', + 'openapi/openapi.yml', 'openapi/swagger.yml', + 'openapi/my_openapi.yml', 'openapi/swagger_one.yml' ] openapi_types.each do |type_name| expect(described_class.type_of(type_name)).to eq(:openapi) end - expect(described_class.type_of('openapiyml')).to be_nil + openapi_bad_types = [ + 'openapiyml', + 'openapi/attention.yaml', 'swagger/attention.yaml' + ] + + openapi_bad_types.each do |type_name| + expect(described_class.type_of(type_name)).to be_nil + end end end end |