Commit d69853585415c1fa89a9e39e4f2e0853412b047b
1 parent
2af8ace1
Exists in
spb-stable
and in
2 other branches
Add a test for issue sentence generation
Showing
3 changed files
with
17 additions
and
1 deletions
Show diff stats
app/helpers/merge_requests_helper.rb
app/views/projects/merge_requests/show/_state_widget.html.haml
| ... | ... | @@ -0,0 +1,12 @@ |
| 1 | +require 'spec_helper' | |
| 2 | + | |
| 3 | +describe MergeRequestsHelper do | |
| 4 | + describe :issues_sentence do | |
| 5 | + subject { issues_sentence(issues) } | |
| 6 | + let(:issues) do | |
| 7 | + [build(:issue, iid: 1), build(:issue, iid: 2), build(:issue, iid: 3)] | |
| 8 | + end | |
| 9 | + | |
| 10 | + it { should eq('#1, #2, and #3') } | |
| 11 | + end | |
| 12 | +end | ... | ... |