Commit 86b17f77 authored by Lucas Charles's avatar Lucas Charles

De-duplicate GlRepository EE specs

 Related to https://gitlab.com/gitlab-org/gitlab/-/issues/211887
parent 52284c1d
...@@ -213,7 +213,6 @@ Gitlab/DuplicateSpecLocation: ...@@ -213,7 +213,6 @@ Gitlab/DuplicateSpecLocation:
- ee/spec/services/merge_requests/update_service_spec.rb - ee/spec/services/merge_requests/update_service_spec.rb
- ee/spec/services/system_hooks_service_spec.rb - ee/spec/services/system_hooks_service_spec.rb
- ee/spec/helpers/ee/auth_helper_spec.rb - ee/spec/helpers/ee/auth_helper_spec.rb
- ee/spec/lib/ee/gitlab/gl_repository_spec.rb
- ee/spec/models/ee/namespace_spec.rb - ee/spec/models/ee/namespace_spec.rb
- ee/spec/models/ee/note_spec.rb - ee/spec/models/ee/note_spec.rb
- ee/spec/serializers/ee/environment_entity_spec.rb - ee/spec/serializers/ee/environment_entity_spec.rb
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ::EE::Gitlab::GlRepository do describe Gitlab::GlRepository do
describe "DESIGN" do describe "DESIGN" do
it "uses the design access checker" do it "uses the design access checker" do
expect(described_class::DESIGN.access_checker_class).to eq(::Gitlab::GitAccessDesign) expect(described_class::DESIGN.access_checker_class).to eq(::Gitlab::GitAccessDesign)
...@@ -12,4 +12,20 @@ describe ::EE::Gitlab::GlRepository do ...@@ -12,4 +12,20 @@ describe ::EE::Gitlab::GlRepository do
.to be_a(::DesignManagement::Repository) .to be_a(::DesignManagement::Repository)
end end
end end
describe '.parse' do
let_it_be(:project) { create(:project, :repository) }
it 'parses a design gl_repository' do
expect(described_class.parse("design-#{project.id}")).to eq([project, project, EE::Gitlab::GlRepository::DESIGN])
end
end
describe '.types' do
it 'contains both the EE and CE repository types' do
expected_types = Gitlab::GlRepository::TYPES.merge(EE::Gitlab::GlRepository::EE_TYPES)
expect(described_class.types).to eq(expected_types)
end
end
end end
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::GlRepository do
describe '.parse' do
let_it_be(:project) { create(:project, :repository) }
it 'parses a design gl_repository' do
expect(described_class.parse("design-#{project.id}")).to eq([project, project, EE::Gitlab::GlRepository::DESIGN])
end
end
describe '.types' do
it 'contains both the EE and CE repository types' do
expected_types = Gitlab::GlRepository::TYPES.merge(EE::Gitlab::GlRepository::EE_TYPES)
expect(described_class.types).to eq(expected_types)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment