diff options
author | Rémy Coutable <remy@rymai.me> | 2017-09-19 19:23:15 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-09 15:07:10 +0200 |
commit | 075d6516047d899746d22b5323d3b74558e200d0 (patch) | |
tree | f958ce8b1ab36d898e9d8dc894e0ed63fbcf7ebd /spec/models/issue_spec.rb | |
parent | 67d5ca9f9220e5572f3fa6d0d8290cd7b802f02f (diff) | |
download | gitlab-ce-075d6516047d899746d22b5323d3b74558e200d0.tar.gz |
Start adding Gitlab::HookData::IssuableBuilder
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r-- | spec/models/issue_spec.rb | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index e547da0cfbe..bd1ae3c4945 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -702,15 +702,39 @@ describe Issue do describe '#hook_attrs' do let(:attrs_hash) { subject.hook_attrs } - it 'includes time tracking attrs' do + it 'includes safe attribute' do + %w[ + assignee_id + author_id + branch_name + closed_at + confidential + created_at + deleted_at + description + due_date + id + iid + last_edited_at + last_edited_by_id + milestone_id + moved_to_id + project_id + relative_position + state + time_estimate + title + updated_at + updated_by_id + ].each do |key| + expect(attrs_hash).to include(key) + end + end + + it 'includes additional 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 - - it 'includes assignee_ids and deprecated assignee_id' do - expect(attrs_hash).to include(:assignee_id) expect(attrs_hash).to include(:assignee_ids) end end |