fixes breadcrumbs on new issue page. adds link to issues page.

This commit is contained in:
J.D. Bean 2018-09-04 16:48:57 +00:00 committed by Rémy Coutable
parent d73541d006
commit 4cdaecaea0
3 changed files with 25 additions and 1 deletions

View file

@ -1,4 +1,5 @@
- breadcrumb_title "Issues"
- add_to_breadcrumbs "Issues", project_issues_path(@project)
- breadcrumb_title "New"
- page_title "New Issue"
%h3.page-title

View file

@ -0,0 +1,5 @@
---
title: "Fix breadcrumb link to issues on new issue page"
merge_request: 21305
author: J.D. Bean
type: fixed

View file

@ -0,0 +1,18 @@
require 'rails_helper'
describe 'New issue breadcrumbs' do
let(:project) { create(:project) }
let(:user) { project.creator }
before do
sign_in(user)
visit new_project_issue_path(project)
end
it 'display a link to project issues and new issue pages' do
page.within '.breadcrumbs' do
expect(find_link('Issues')[:href]).to end_with(project_issues_path(project))
expect(find_link('New')[:href]).to end_with(new_project_issue_path(project))
end
end
end