From d6ce16a4070112512d792f7ab66fdca4764cbf2c Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 28 Jan 2022 12:17:26 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/lib/gitlab_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/lib/gitlab_spec.rb') diff --git a/spec/lib/gitlab_spec.rb b/spec/lib/gitlab_spec.rb index 49ba4debe31..57a4bdc9bb5 100644 --- a/spec/lib/gitlab_spec.rb +++ b/spec/lib/gitlab_spec.rb @@ -99,6 +99,13 @@ RSpec.describe Gitlab do expect(described_class.com?).to eq true end + it 'is true when on other gitlab subdomain with hyphen' do + url_with_subdomain = Gitlab::Saas.com_url.gsub('https://', 'https://test-example.') + stub_config_setting(url: url_with_subdomain) + + expect(described_class.com?).to eq true + end + it 'is false when not on GitLab.com' do stub_config_setting(url: 'http://example.com') -- cgit v1.2.1