diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-07-05 06:32:05 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-07-05 06:32:05 +0000 |
commit | 3db2f327594e134729a0ca2f48a748bb28ab7d6c (patch) | |
tree | 661033b988897aaf506c0deaf457c2002e17d51b /spec/features/snippets/user_snippets_spec.rb | |
parent | baab4cddb091c0aa9649fecc340b8b343747ba83 (diff) | |
download | gitlab-ce-3db2f327594e134729a0ca2f48a748bb28ab7d6c.tar.gz |
Enable Capybara/FeatureMethods cop
Diffstat (limited to 'spec/features/snippets/user_snippets_spec.rb')
-rw-r--r-- | spec/features/snippets/user_snippets_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/features/snippets/user_snippets_spec.rb b/spec/features/snippets/user_snippets_spec.rb index 7bc27486787..e3065a899cc 100644 --- a/spec/features/snippets/user_snippets_spec.rb +++ b/spec/features/snippets/user_snippets_spec.rb @@ -1,23 +1,23 @@ require 'rails_helper' -feature 'User Snippets' do +describe 'User Snippets' do let(:author) { create(:user) } let!(:public_snippet) { create(:personal_snippet, :public, author: author, title: "This is a public snippet") } let!(:internal_snippet) { create(:personal_snippet, :internal, author: author, title: "This is an internal snippet") } let!(:private_snippet) { create(:personal_snippet, :private, author: author, title: "This is a private snippet") } - background do + before do sign_in author visit dashboard_snippets_path end - scenario 'View all of my snippets' do + it 'View all of my snippets' do expect(page).to have_content(public_snippet.title) expect(page).to have_content(internal_snippet.title) expect(page).to have_content(private_snippet.title) end - scenario 'View my public snippets' do + it 'View my public snippets' do page.within('.snippet-scope-menu') do click_link "Public" end @@ -27,7 +27,7 @@ feature 'User Snippets' do expect(page).not_to have_content(private_snippet.title) end - scenario 'View my internal snippets' do + it 'View my internal snippets' do page.within('.snippet-scope-menu') do click_link "Internal" end @@ -37,7 +37,7 @@ feature 'User Snippets' do expect(page).not_to have_content(private_snippet.title) end - scenario 'View my private snippets' do + it 'View my private snippets' do page.within('.snippet-scope-menu') do click_link "Private" end |