summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-08-12 15:29:49 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-08-12 15:29:49 +0800
commitabd3ac4a038a83cce5db2aa93f685c921710abba (patch)
tree147afb32343ef6f1ffd6bca74c23eb085f88d614
parentaaf30b4e8180588fbd26c11967ec036081f0a87e (diff)
downloadgitlab-ce-abd3ac4a038a83cce5db2aa93f685c921710abba.tar.gz
Make it more grammatically correct, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13811203
-rw-r--r--spec/models/ci/pipeline_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index 685c4178e89..2266b954aeb 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -329,7 +329,7 @@ describe Ci::Pipeline, models: true do
end
it 'receive a pending event once' do
- expect(WebMock).to requested('pending').once
+ expect(WebMock).to have_requested_pipeline_hook('pending').once
end
end
@@ -342,7 +342,7 @@ describe Ci::Pipeline, models: true do
end
it 'receive a running event once' do
- expect(WebMock).to requested('running').once
+ expect(WebMock).to have_requested_pipeline_hook('running').once
end
end
@@ -353,11 +353,11 @@ describe Ci::Pipeline, models: true do
end
it 'receive a success event once' do
- expect(WebMock).to requested('success').once
+ expect(WebMock).to have_requested_pipeline_hook('success').once
end
end
- def requested(status)
+ def have_requested_pipeline_hook(status)
have_requested(:post, hook.url).with do |req|
json_body = JSON.parse(req.body)
json_body['object_attributes']['status'] == status &&