Commit 2566c89a authored by Kamil Trzcinski's avatar Kamil Trzcinski

Remove testing delegate

parent 7d907acc
...@@ -22,10 +22,10 @@ class Projects::PipelinesController < Projects::ApplicationController ...@@ -22,10 +22,10 @@ class Projects::PipelinesController < Projects::ApplicationController
pipeline = Ci::CreatePipelineService.new(project, current_user, create_params).execute pipeline = Ci::CreatePipelineService.new(project, current_user, create_params).execute
redirect_to namespace_project_pipeline_path(project.namespace, project, pipeline) redirect_to namespace_project_pipeline_path(project.namespace, project, pipeline)
rescue ArgumentError => e rescue ArgumentError => e
@error = e.message flash[:alert] = e.message
render 'new' render 'new'
rescue rescue
@error = 'Undefined error' flash[:alert] = 'Undefined error'
render 'new' render 'new'
end end
end end
......
...@@ -10,7 +10,6 @@ describe Ci::Commit, models: true do ...@@ -10,7 +10,6 @@ describe Ci::Commit, models: true do
it { is_expected.to have_many(:builds) } it { is_expected.to have_many(:builds) }
it { is_expected.to validate_presence_of :sha } it { is_expected.to validate_presence_of :sha }
it { is_expected.to validate_presence_of :status } it { is_expected.to validate_presence_of :status }
it { is_expected.to delegate_method(:stages).to(:statuses) }
it { is_expected.to respond_to :git_author_name } it { is_expected.to respond_to :git_author_name }
it { is_expected.to respond_to :git_author_email } it { is_expected.to respond_to :git_author_email }
......
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