2018-11-20 20:47:30 +05:30
|
|
|
require 'rails_helper'
|
|
|
|
|
2018-12-23 12:14:25 +05:30
|
|
|
describe 'New issue breadcrumb' do
|
2018-11-20 20:47:30 +05:30
|
|
|
let(:project) { create(:project) }
|
2018-12-23 12:14:25 +05:30
|
|
|
let(:user) { project.creator }
|
2018-11-20 20:47:30 +05:30
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in(user)
|
2018-12-23 12:14:25 +05:30
|
|
|
visit(new_project_issue_path(project))
|
2018-11-20 20:47:30 +05:30
|
|
|
end
|
|
|
|
|
2018-12-23 12:14:25 +05:30
|
|
|
it 'displays link to project issues and new issue' do
|
2018-11-20 20:47:30 +05:30
|
|
|
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
|