diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-12-19 14:12:19 +0300 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-12-21 05:50:24 +0300 |
commit | 467337fa118ad0f04f93ba196a2cfbe178ccf74c (patch) | |
tree | e38ecb5995fa0113132cdc166251e5fe828485cf /spec/models/milestone_spec.rb | |
parent | 62d250ff666770f9807eec2199a7b208ea8b518a (diff) |
Add % prefix to milestone reference link text
Also update banzai tests to use reference_link_text
Diffstat (limited to 'spec/models/milestone_spec.rb')
-rw-r--r-- | spec/models/milestone_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb index d11eb46159e..b3d31e65c85 100644 --- a/spec/models/milestone_spec.rb +++ b/spec/models/milestone_spec.rb @@ -316,6 +316,15 @@ describe Milestone do end end + describe '#reference_link_text' do + let(:project) { build_stubbed(:project, name: 'sample-project') } + let(:milestone) { build_stubbed(:milestone, iid: 1, project: project, name: 'milestone') } + + it 'returns the title with the reference prefix' do + expect(milestone.reference_link_text).to eq '%milestone' + end + end + describe '#participants' do let(:project) { build(:project, name: 'sample-project') } let(:milestone) { build(:milestone, iid: 1, project: project) } |