diff options
author | Phil Hughes <me@iamphill.com> | 2017-09-15 11:44:12 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-09-15 11:44:12 +0300 |
commit | 030bfd85ea6d6929c9ed7fcc976eb3453e53abbf (patch) | |
tree | bbac930239f91ae76342186ac633c8b6d63635a3 /spec/views | |
parent | 93e189c41c2c110c57e456e1c5bffad1700f3068 (diff) |
Fixes milestone issuable assignee URL
Closes #33124
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/shared/milestones/_issuable.html.haml.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/views/shared/milestones/_issuable.html.haml.rb b/spec/views/shared/milestones/_issuable.html.haml.rb new file mode 100644 index 00000000000..0a3f877cae0 --- /dev/null +++ b/spec/views/shared/milestones/_issuable.html.haml.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe 'shared/milestones/_issuable.html.haml' do + let(:project) { create(:project) } + let(:user) { create(:user) } + let(:milestone) { create(:milestone, project: project) } + let(:issuable) { create(:issue, project: project, assignees: [user]) } + + before do + assign(:project, project) + assign(:milestone, milestone) + end + + it 'avatar links to issues page' do + render 'shared/milestones/issuable', issuable: issuable, show_project_name: true + + expect(rendered).to have_css("a[href='#{project_issues_path(project, milestone_title: milestone.title, assignee_id: user.id, state: 'all')}']") + end +end |