Refactor auto_devops_domain setting specs

This commit is contained in:
Matija Čupić 2018-01-22 20:37:02 +01:00
parent f5591e4c90
commit 6028f9eecf
No known key found for this signature in database
GPG Key ID: 4BAF84FFACD2E5DE
1 changed files with 6 additions and 12 deletions

View File

@ -120,6 +120,12 @@ describe ApplicationSetting do
setting.update(auto_devops_enabled: true)
end
it 'can be blank' do
setting.update(auto_devops_domain: '')
expect(setting).to be_valid
end
context 'with a valid value' do
before do
setting.update(auto_devops_domain: 'domain.com')
@ -140,18 +146,6 @@ describe ApplicationSetting do
end
end
end
context 'when auto_devops_enabled? is false' do
before do
setting.update(auto_devops_enabled: false)
end
it 'can be blank' do
setting.update(auto_devops_domain: '')
expect(setting).to be_valid
end
end
end
context 'circuitbreaker settings' do