summaryrefslogtreecommitdiff
path: root/spec/models/issue_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r--spec/models/issue_spec.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb
index e547da0cfbe..bb5033c1628 100644
--- a/spec/models/issue_spec.rb
+++ b/spec/models/issue_spec.rb
@@ -700,18 +700,14 @@ describe Issue do
end
describe '#hook_attrs' do
- let(:attrs_hash) { subject.hook_attrs }
+ it 'delegates to Gitlab::HookData::IssueBuilder#build' do
+ builder = double
- it 'includes time tracking attrs' do
- expect(attrs_hash).to include(:total_time_spent)
- expect(attrs_hash).to include(:human_time_estimate)
- expect(attrs_hash).to include(:human_total_time_spent)
- expect(attrs_hash).to include('time_estimate')
- end
+ expect(Gitlab::HookData::IssueBuilder)
+ .to receive(:new).with(subject).and_return(builder)
+ expect(builder).to receive(:build)
- it 'includes assignee_ids and deprecated assignee_id' do
- expect(attrs_hash).to include(:assignee_id)
- expect(attrs_hash).to include(:assignee_ids)
+ subject.hook_attrs
end
end