gitlab-org--gitlab-foss/spec/lib/gitlab_spec.rb
Robert Speicher 2e13f6c326 Add Gitlab.com? method
To be used as a feature flag for GitLab.com-only features, such as
welcome emails.

We will be careful to only use this to disable features or functionality
that do not make sense for any installations that aren't GitLab.com. We
will not use this to restrict features from other installations or keep
them "exclusive" to GitLab.com.
2016-04-12 17:30:11 -04:00

17 lines
387 B
Ruby

require 'rails_helper'
describe Gitlab, lib: true do
describe '.com?' do
it 'is true when on GitLab.com' do
stub_config_setting(url: 'https://gitlab.com')
expect(described_class.com?).to eq true
end
it 'is false when not on GitLab.com' do
stub_config_setting(url: 'http://example.com')
expect(described_class.com?).to eq false
end
end
end