diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-04-24 15:44:12 +0200 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2019-04-24 15:44:12 +0200 |
commit | 163730f0a2c8f7266cc9521bfd326b351688c48c (patch) | |
tree | b1626706cbdff720cbae2d2344495e2aacfb5b3b /spec/controllers | |
parent | a89e8149b686c37962612779b0d245e7a90e59a8 (diff) | |
download | gitlab-ce-163730f0a2c8f7266cc9521bfd326b351688c48c.tar.gz |
Redirect to settings page on invalid update
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/settings/ci_cd_controller_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/controllers/projects/settings/ci_cd_controller_spec.rb b/spec/controllers/projects/settings/ci_cd_controller_spec.rb index fc9a0adeed2..db53e5bc8a4 100644 --- a/spec/controllers/projects/settings/ci_cd_controller_spec.rb +++ b/spec/controllers/projects/settings/ci_cd_controller_spec.rb @@ -191,6 +191,15 @@ describe Projects::Settings::CiCdController do expect(project.build_timeout).to eq(5400) end end + + context 'when build_timeout_human_readable is invalid' do + let(:params) { { build_timeout_human_readable: '5m' } } + + it 'set specified timeout' do + expect(subject).to set_flash[:alert] + expect(response).to redirect_to(namespace_project_settings_ci_cd_path) + end + end end end end |