Feature/new user snippets breadcrumbs
This commit is contained in:
parent
28086b203a
commit
fbb0fc5e87
3 changed files with 24 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
17
spec/features/snippets/user_sees_breadcrumb_links.rb
Normal file
17
spec/features/snippets/user_sees_breadcrumb_links.rb
Normal 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
|
Loading…
Reference in a new issue