gitlab-org--gitlab-foss/spec/models/project_auto_devops_spec.rb
2017-09-06 21:00:34 +02:00

23 lines
629 B
Ruby

require 'spec_helper'
describe ProjectAutoDevops do
set(:project) { build(:project) }
it { is_expected.to belong_to(:project) }
it { is_expected.to respond_to(:created_at) }
it { is_expected.to respond_to(:updated_at) }
describe 'variables' do
let(:auto_devops) { build_stubbed(:project_auto_devops, project: project, domain: domain) }
context 'when domain is defined' do
let(:domain) { 'example.com' }
it 'returns AUTO_DEVOPS_DOMAIN' do
expect(auto_devops.variables).to include(
{ key: 'AUTO_DEVOPS_DOMAIN', value: 'example.com', public: true })
end
end
end
end