diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-02-15 15:31:25 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-02-15 15:31:51 +0800 |
commit | cfd839d6f5092be2f5224eddc155f6cf05cd1be6 (patch) | |
tree | 991d7733486399d04d5c9cbade669a12b7aa90c8 /spec/models/application_setting_spec.rb | |
parent | 602f3b84c08c06cd132a8c53c7bcbb3a139cebfd (diff) | |
download | gitlab-ce-cfd839d6f5092be2f5224eddc155f6cf05cd1be6.tar.gz |
Fix tests and disallow 0 to make it consistent with .gitlab-ci.yml
Diffstat (limited to 'spec/models/application_setting_spec.rb')
-rw-r--r-- | spec/models/application_setting_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index 15632bac094..9629f858609 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -36,6 +36,12 @@ describe ApplicationSetting, models: true do expect(setting).to be_invalid end + it 'does not allow 0' do + setting.update(default_artifacts_expire_in: '0') + + expect(setting).to be_invalid + end + it 'sets the value if it is valid' do setting.update(default_artifacts_expire_in: '30 days') |