diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-12-24 17:03:54 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-12-24 17:11:08 -0500 |
commit | ab3d855c0e1869fd1986c3bcdf7519f6b1cf1fa8 (patch) | |
tree | 7d0a1117b4cae0660004c00684dcbab1cde4069a /spec/models | |
parent | 99dc1fce5ed84fb78bd993423db9c470021ea3a2 (diff) | |
download | gitlab-ce-ab3d855c0e1869fd1986c3bcdf7519f6b1cf1fa8.tar.gz |
Add support for `twitter:label` meta tagsrs-opengraph
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/concerns/issuable_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/concerns/issuable_spec.rb b/spec/models/concerns/issuable_spec.rb index 0f13c4410cd..901eb936688 100644 --- a/spec/models/concerns/issuable_spec.rb +++ b/spec/models/concerns/issuable_spec.rb @@ -81,4 +81,22 @@ describe Issue, "Issuable" do expect(hook_data[:object_attributes]).to eq(issue.hook_attrs) end end + + describe '#card_attributes' do + it 'includes the author name' do + allow(issue).to receive(:author).and_return(double(name: 'Robert')) + allow(issue).to receive(:assignee).and_return(nil) + + expect(issue.card_attributes). + to eq({'Author' => 'Robert', 'Assignee' => nil}) + end + + it 'includes the assignee name' do + allow(issue).to receive(:author).and_return(double(name: 'Robert')) + allow(issue).to receive(:assignee).and_return(double(name: 'Douwe')) + + expect(issue.card_attributes). + to eq({'Author' => 'Robert', 'Assignee' => 'Douwe'}) + end + end end |