summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/hook_data
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-11-14 18:55:00 +0100
committerRémy Coutable <remy@rymai.me>2017-11-15 15:42:19 +0100
commit05c10c9bf77db2a9e37e61d1953ef0150289322d (patch)
treeaf7d820349678773d5b0835d652425e70dbffe80 /spec/lib/gitlab/hook_data
parenta4072db0198896242886d22c644ed91c1016aa8d (diff)
downloadgitlab-ce-05c10c9bf77db2a9e37e61d1953ef0150289322d.tar.gz
Add total_time_spent to the `changes` hash in issuable Webhook payloads40122-only-one-note-webhook-is-triggered-when-a-comment-with-time-spent-is-added
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/lib/gitlab/hook_data')
-rw-r--r--spec/lib/gitlab/hook_data/issuable_builder_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/lib/gitlab/hook_data/issuable_builder_spec.rb b/spec/lib/gitlab/hook_data/issuable_builder_spec.rb
index 30da56bec16..26529c4759d 100644
--- a/spec/lib/gitlab/hook_data/issuable_builder_spec.rb
+++ b/spec/lib/gitlab/hook_data/issuable_builder_spec.rb
@@ -41,7 +41,8 @@ describe Gitlab::HookData::IssuableBuilder do
labels: [
[{ id: 1, title: 'foo' }],
[{ id: 1, title: 'foo' }, { id: 2, title: 'bar' }]
- ]
+ ],
+ total_time_spent: [1, 2]
}
end
let(:data) { builder.build(user: user, changes: changes) }
@@ -53,6 +54,10 @@ describe Gitlab::HookData::IssuableBuilder do
labels: {
previous: [{ id: 1, title: 'foo' }],
current: [{ id: 1, title: 'foo' }, { id: 2, title: 'bar' }]
+ },
+ total_time_spent: {
+ previous: 1,
+ current: 2
}
}))
end