debian-mirror-gitlab/spec/lib/gitlab_spec.rb

24 lines
529 B
Ruby
Raw Normal View History

2016-06-02 11:05:42 +05:30
require 'rails_helper'
2017-09-10 17:25:29 +05:30
describe Gitlab do
2016-06-02 11:05:42 +05:30
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
2016-08-24 12:49:21 +05:30
it 'is true when on staging' do
stub_config_setting(url: 'https://staging.gitlab.com')
expect(described_class.com?).to eq true
end
2016-06-02 11:05:42 +05:30
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