diff options
author | Ruben Davila <rdavila84@gmail.com> | 2017-03-14 11:56:15 -0500 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2017-03-14 11:56:15 -0500 |
commit | dd53a9c0132d48393ca11e29825b599a5a1454a7 (patch) | |
tree | 9f35948e592d4d53dc0c187082bb3505a30ab30b /spec | |
parent | ffcddb295950729dbc4ee7a3c0e32f7dec00da99 (diff) | |
download | gitlab-ce-dd53a9c0132d48393ca11e29825b599a5a1454a7.tar.gz |
Include time tracking attributes in webhooks payload27271-missing-time-spent-in-issue-webhook
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/issue_spec.rb | 11 | ||||
-rw-r--r-- | spec/models/merge_request_spec.rb | 6 |
2 files changed, 16 insertions, 1 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index bba9058f394..898a9c8da35 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -620,4 +620,15 @@ describe Issue, models: true do end end end + + describe '#hook_attrs' do + let(:attrs_hash) { subject.hook_attrs } + + 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 + end end diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index fcaf4c71182..24e7c1b17d9 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -542,7 +542,7 @@ describe MergeRequest, models: true do end describe "#hook_attrs" do - let(:attrs_hash) { subject.hook_attrs.to_h } + let(:attrs_hash) { subject.hook_attrs } [:source, :target].each do |key| describe "#{key} key" do @@ -558,6 +558,10 @@ describe MergeRequest, models: true do expect(attrs_hash).to include(:target) expect(attrs_hash).to include(:last_commit) expect(attrs_hash).to include(:work_in_progress) + 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 end |