Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qa/spec/runtime/env_spec.rb')
-rw-r--r--qa/spec/runtime/env_spec.rb52
1 files changed, 0 insertions, 52 deletions
diff --git a/qa/spec/runtime/env_spec.rb b/qa/spec/runtime/env_spec.rb
index 5a98721466f..8218ab428b0 100644
--- a/qa/spec/runtime/env_spec.rb
+++ b/qa/spec/runtime/env_spec.rb
@@ -341,56 +341,4 @@ RSpec.describe QA::Runtime::Env do
end
end
end
-
- describe '.context_matches?' do
- it 'returns true when url has .com' do
- QA::Runtime::Scenario.define(:gitlab_address, "https://staging.gitlab.com")
-
- expect(described_class.dot_com?).to be_truthy
- end
-
- it 'returns false when url does not have .com' do
- QA::Runtime::Scenario.define(:gitlab_address, "https://gitlab.test")
-
- expect(described_class.dot_com?).to be_falsey
- end
-
- context 'with arguments' do
- it 'returns true when :subdomain is set' do
- QA::Runtime::Scenario.define(:gitlab_address, "https://staging.gitlab.com")
-
- expect(described_class.dot_com?(subdomain: :staging)).to be_truthy
- end
-
- it 'matches multiple subdomains' do
- QA::Runtime::Scenario.define(:gitlab_address, "https://staging.gitlab.com")
-
- expect(described_class.context_matches?(subdomain: [:release, :staging])).to be_truthy
- expect(described_class.context_matches?(:production, subdomain: [:release, :staging])).to be_truthy
- end
-
- it 'matches :production' do
- QA::Runtime::Scenario.define(:gitlab_address, "https://gitlab.com/")
-
- expect(described_class.context_matches?(:production)).to be_truthy
- end
-
- it 'doesnt match with mismatching switches' do
- QA::Runtime::Scenario.define(:gitlab_address, 'https://gitlab.test')
-
- aggregate_failures do
- expect(described_class.context_matches?(tld: '.net')).to be_falsey
- expect(described_class.context_matches?(:production)).to be_falsey
- expect(described_class.context_matches?(subdomain: [:staging])).to be_falsey
- expect(described_class.context_matches?(domain: 'example')).to be_falsey
- end
- end
- end
-
- it 'returns false for mismatching' do
- QA::Runtime::Scenario.define(:gitlab_address, "https://staging.gitlab.com")
-
- expect(described_class.context_matches?(:production)).to be_falsey
- end
- end
end