Feature/new user snippets breadcrumbs

This commit is contained in:
J.D. Bean 2018-09-24 13:36:37 +00:00 committed by Rémy Coutable
parent 28086b203a
commit fbb0fc5e87
3 changed files with 24 additions and 1 deletions

View file

@ -1,5 +1,6 @@
- @hide_top_links = true
- breadcrumb_title "Snippets"
- add_to_breadcrumbs "Snippets", dashboard_snippets_path
- breadcrumb_title "New"
- page_title "New Snippet"
%h3.page-title
New Snippet

View file

@ -0,0 +1,5 @@
---
title: Add link to User Snippets in breadcrumbs of New User Snippet page
merge_request:
author: J.D. Bean
type: add

View file

@ -0,0 +1,17 @@
require 'rails_helper'
describe 'New user snippet breadcrumbs' do
let(:user) { create(:user) }
before do
sign_in(user)
visit new_snippet_path
end
it 'display a link to user snippets and new user snippet pages' do
page.within '.breadcrumbs' do
expect(find_link('Snippets')[:href]).to end_with(dashboard_snippets_path)
expect(find_link('New')[:href]).to end_with(new_snippet_path)
end
end
end