summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJ.D. Bean <jonathandbean@gmail.com>2018-09-24 13:36:37 +0000
committerRémy Coutable <remy@rymai.me>2018-09-24 13:36:37 +0000
commitfbb0fc5e8740e8acbbc319bc961b9c65dadb0431 (patch)
treeaab33898d69cbe905bf05ba9a198fa09559ff78c /spec
parent28086b203ae397e01d5e9870dfbddd66466450c2 (diff)
downloadgitlab-ce-fbb0fc5e8740e8acbbc319bc961b9c65dadb0431.tar.gz
Feature/new user snippets breadcrumbs
Diffstat (limited to 'spec')
-rw-r--r--spec/features/snippets/user_sees_breadcrumb_links.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/snippets/user_sees_breadcrumb_links.rb b/spec/features/snippets/user_sees_breadcrumb_links.rb
new file mode 100644
index 00000000000..696f2b93390
--- /dev/null
+++ b/spec/features/snippets/user_sees_breadcrumb_links.rb
@@ -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