diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-02-14 19:17:36 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-02-15 15:31:51 +0800 |
commit | 696a5da7fd78093567ae2bc7a795a38462dd7b3d (patch) | |
tree | 27a31a60b7112a41183f90b609e5f04322ec0891 /spec/requests/ci | |
parent | d2d30cff552e08c4b7ec2b5e23acced8eb29cbcb (diff) | |
download | gitlab-ce-696a5da7fd78093567ae2bc7a795a38462dd7b3d.tar.gz |
ApplicationSetting.current doesn't work well in tests
Therefore we prefer
`Gitlab::CurrentSettings.current_application_settings`
and fix the tests by setting default_artifacts_expire_in to 0
to restore the original behaviour.
Diffstat (limited to 'spec/requests/ci')
-rw-r--r-- | spec/requests/ci/api/builds_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb index d85afdeab42..44f69bff30d 100644 --- a/spec/requests/ci/api/builds_spec.rb +++ b/spec/requests/ci/api/builds_spec.rb @@ -638,6 +638,8 @@ describe Ci::API::Builds do end before do + stub_application_setting(default_artifacts_expiration: 0) + post(post_url, post_data, headers_with_token) end |