summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-14 15:55:00 -0500
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-14 15:55:00 -0500
commit2566c89a3232d6d4d5aa5d77821819e86424548d (patch)
tree998fc498861cbffa138c9d8a0ff76ed6d0e526c9
parent7d907acc3805a692fd9f6f29e529c5b5fe15ec11 (diff)
downloadgitlab-ce-2566c89a3232d6d4d5aa5d77821819e86424548d.tar.gz
Remove testing delegate
-rw-r--r--app/controllers/projects/pipelines_controller.rb4
-rw-r--r--spec/models/ci/commit_spec.rb1
2 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb
index f3f5338003a..78b85ea9a71 100644
--- a/app/controllers/projects/pipelines_controller.rb
+++ b/app/controllers/projects/pipelines_controller.rb
@@ -22,10 +22,10 @@ class Projects::PipelinesController < Projects::ApplicationController
pipeline = Ci::CreatePipelineService.new(project, current_user, create_params).execute
redirect_to namespace_project_pipeline_path(project.namespace, project, pipeline)
rescue ArgumentError => e
- @error = e.message
+ flash[:alert] = e.message
render 'new'
rescue
- @error = 'Undefined error'
+ flash[:alert] = 'Undefined error'
render 'new'
end
end
diff --git a/spec/models/ci/commit_spec.rb b/spec/models/ci/commit_spec.rb
index dc071ad1c90..1b5940ad5a8 100644
--- a/spec/models/ci/commit_spec.rb
+++ b/spec/models/ci/commit_spec.rb
@@ -10,7 +10,6 @@ describe Ci::Commit, models: true do
it { is_expected.to have_many(:builds) }
it { is_expected.to validate_presence_of :sha }
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_email }