Commit 0ea70802 authored by Stan Hu's avatar Stan Hu

Fix Sidekiq worker and make flash message return a link to the pipelines page

parent ad373295
......@@ -46,7 +46,7 @@ class Projects::PipelineSchedulesController < Projects::ApplicationController
flash[:notice] =
if job_id
'Successfully scheduled pipeline to run immediately'
"Successfully scheduled a pipeline to run. Go to the <a href=\"#{project_pipelines_path(@project)}\">Pipelines page</a> for details".html_safe
else
'Unable to schedule a pipeline to run immediately'
end
......
class RunPipelineScheduleWorker
include Sidekiq::Worker
include ApplicationWorker
include PipelineQueue
enqueue_in group: :creation
......
......@@ -380,7 +380,7 @@ describe Projects::PipelineSchedulesController do
post :play, namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id
expect(flash[:notice]).to eq 'Successfully scheduled pipeline to run immediately'
expect(flash[:notice]).to start_with 'Successfully scheduled a pipeline to run'
expect(response).to have_gitlab_http_status(302)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment