Skip to content
Snippets Groups Projects
Verified Commit 163730f0 authored by Matija Čupić's avatar Matija Čupić
Browse files

Redirect to settings page on invalid update

parent a89e8149
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -19,7 +19,7 @@ module Projects
 
redirect_to project_settings_ci_cd_path(@project)
else
render 'show'
redirect_to project_settings_ci_cd_path(@project), alert: result[:message]
end
end
end
Loading
Loading
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment