Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-09-19 16:56:44 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-09-19 19:42:13 +0300
commit9bed20d2ae4b37f735b2c6cacd09379022708300 (patch)
tree7eeff6b5d4e9ba9c88f99a9cfa0bcd65245afc64 /spec/models/project_auto_devops_spec.rb
parent3017697701eaecd301edfbc2e4f7c865456f1b0f (diff)
Add specs for warning message shown in Auto DevOps settings
Diffstat (limited to 'spec/models/project_auto_devops_spec.rb')
-rw-r--r--spec/models/project_auto_devops_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/models/project_auto_devops_spec.rb b/spec/models/project_auto_devops_spec.rb
index f4bb4b3e7a3..12069575866 100644
--- a/spec/models/project_auto_devops_spec.rb
+++ b/spec/models/project_auto_devops_spec.rb
@@ -9,9 +9,17 @@ describe ProjectAutoDevops do
it { is_expected.to respond_to(:updated_at) }
describe '#has_domain?' do
- let(:auto_devops) { build_stubbed(:project_auto_devops, project: project, domain: 'domain.com') }
+ context 'when domain is defined' do
+ let(:auto_devops) { build_stubbed(:project_auto_devops, project: project, domain: 'domain.com') }
+
+ it { expect(auto_devops).to have_domain }
+ end
- it { is_expected.to have_domain }
+ context 'when domain is empty' do
+ let(:auto_devops) { build_stubbed(:project_auto_devops, project: project, domain: '') }
+
+ it { expect(auto_devops).not_to have_domain }
+ end
end
describe '#variables' do