summaryrefslogtreecommitdiff
path: root/spec/services/ide/schemas_config_service_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/services/ide/schemas_config_service_spec.rb
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
downloadgitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/services/ide/schemas_config_service_spec.rb')
-rw-r--r--spec/services/ide/schemas_config_service_spec.rb34
1 files changed, 10 insertions, 24 deletions
diff --git a/spec/services/ide/schemas_config_service_spec.rb b/spec/services/ide/schemas_config_service_spec.rb
index 69ad9b5cbea..f277b8e9954 100644
--- a/spec/services/ide/schemas_config_service_spec.rb
+++ b/spec/services/ide/schemas_config_service_spec.rb
@@ -20,35 +20,21 @@ RSpec.describe Ide::SchemasConfigService do
subject { described_class.new(project, user, filename: filename).execute }
- context 'feature flag schema_linting is enabled', unless: Gitlab.ee? do
- before do
- stub_feature_flags(schema_linting: true)
- end
-
- context 'when no predefined schema exists for the given filename' do
- it 'returns an empty object' do
- is_expected.to include(
- status: :success,
- schema: {})
- end
- end
-
- context 'when a predefined schema exists for the given filename' do
- let(:filename) { '.gitlab-ci.yml' }
-
- it 'uses predefined schema matches' do
- expect(Gitlab::HTTP).to receive(:get).with('https://json.schemastore.org/gitlab-ci')
- expect(subject[:schema]['title']).to eq "Sample schema"
- end
- end
- end
-
- context 'feature flag schema_linting is disabled', unless: Gitlab.ee? do
+ context 'when no predefined schema exists for the given filename', unless: Gitlab.ee? do
it 'returns an empty object' do
is_expected.to include(
status: :success,
schema: {})
end
end
+
+ context 'when a predefined schema exists for the given filename' do
+ let(:filename) { '.gitlab-ci.yml' }
+
+ it 'uses predefined schema matches' do
+ expect(Gitlab::HTTP).to receive(:get).with('https://json.schemastore.org/gitlab-ci')
+ expect(subject[:schema]['title']).to eq "Sample schema"
+ end
+ end
end
end