BigW Consortium Gitlab

gitlab_spec.rb 529 Bytes
Newer Older
1 2
require 'rails_helper'

3
describe Gitlab do
4 5 6 7 8 9 10
  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

11 12 13 14 15 16
    it 'is true when on staging' do
      stub_config_setting(url: 'https://staging.gitlab.com')

      expect(described_class.com?).to eq true
    end

17 18 19 20 21 22 23
    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