diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 18:07:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 18:07:56 +0300 |
commit | 016af097cb1fa872fdc28a786d16315e55cd2701 (patch) | |
tree | 76f97f90a8048685efb3eb0c543b3a75d99be6ee /spec/models/pages_domain_spec.rb | |
parent | 00b8ecb72c9f77d864aff3572f028613f45af03c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/pages_domain_spec.rb')
-rw-r--r-- | spec/models/pages_domain_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/pages_domain_spec.rb b/spec/models/pages_domain_spec.rb index 4b65bf032d1..b1df13e8c2a 100644 --- a/spec/models/pages_domain_spec.rb +++ b/spec/models/pages_domain_spec.rb @@ -175,6 +175,16 @@ describe PagesDomain do it { is_expected.to validate_presence_of(:verification_code) } end + describe 'default values' do + it 'defaults wildcard to false' do + expect(subject.wildcard).to eq(false) + end + + it 'defaults domain_type to project' do + expect(subject.domain_type).to eq('project') + end + end + describe '#verification_code' do subject { pages_domain.verification_code } @@ -305,6 +315,14 @@ describe PagesDomain do end describe '#update_daemon' do + context 'when domain_type is instance' do + it 'does nothing' do + expect(Projects::UpdatePagesConfigurationService).not_to receive(:new) + + create(:pages_domain, domain_type: :instance) + end + end + it 'runs when the domain is created' do domain = build(:pages_domain) |