Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-06-19 16:17:08 +0300
committerSean McGivern <sean@gitlab.com>2019-06-20 15:50:28 +0300
commitda4702493d046e6de24c0a071b0162818e9d990c (patch)
tree78af36d3f26d4ce25060886cbd76ee09e390ee7e /spec/lib/gitlab/hook_data
parent7277c9b0681186aea3e67ef7ec2dc2b597b5a98c (diff)
Fix label serialisation in issue and note hooks
We were not calling hook_attrs on the labels correctly. Specs were passing because the issues under test did not have any labels!
Diffstat (limited to 'spec/lib/gitlab/hook_data')
-rw-r--r--spec/lib/gitlab/hook_data/issue_builder_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/lib/gitlab/hook_data/issue_builder_spec.rb b/spec/lib/gitlab/hook_data/issue_builder_spec.rb
index f066c0e3813..b06d05c1c7f 100644
--- a/spec/lib/gitlab/hook_data/issue_builder_spec.rb
+++ b/spec/lib/gitlab/hook_data/issue_builder_spec.rb
@@ -1,7 +1,8 @@
require 'spec_helper'
describe Gitlab::HookData::IssueBuilder do
- set(:issue) { create(:issue) }
+ set(:label) { create(:label) }
+ set(:issue) { create(:labeled_issue, labels: [label], project: label.project) }
let(:builder) { described_class.new(issue) }
describe '#build' do
@@ -39,6 +40,7 @@ describe Gitlab::HookData::IssueBuilder do
expect(data).to include(:human_time_estimate)
expect(data).to include(:human_total_time_spent)
expect(data).to include(:assignee_ids)
+ expect(data).to include('labels' => [label.hook_attrs])
end
context 'when the issue has an image in the description' do