From 903431e8895ba196edc7ce67d46279d0d06cba1d Mon Sep 17 00:00:00 2001 From: the-undefined Date: Mon, 7 Nov 2016 08:01:27 +0000 Subject: Move 'Explore Snippets' Spinach feature to Rspec This commit moves the `snippets/discover.feature` Spinach test to a Rspec feature, as part of deprecating the Spinach test suite. The original feature was called 'Discover Snippets', but the UI no longer reflects this wording. The new Rspec feature is called 'Explore Snippets' to reflect UI/Controller/View naming in use. - Remove Spinach discover snippets feature and steps - Add Rspec feature test --- spec/features/snippets/explore_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 spec/features/snippets/explore_spec.rb (limited to 'spec/features/snippets/explore_spec.rb') diff --git a/spec/features/snippets/explore_spec.rb b/spec/features/snippets/explore_spec.rb new file mode 100644 index 00000000000..10a4597e467 --- /dev/null +++ b/spec/features/snippets/explore_spec.rb @@ -0,0 +1,16 @@ +require 'rails_helper' + +feature 'Explore Snippets', feature: true do + scenario 'User should see snippets that are not private' do + public_snippet = create(:personal_snippet, :public) + internal_snippet = create(:personal_snippet, :internal) + private_snippet = create(:personal_snippet, :private) + + login_as create(:user) + visit explore_snippets_path + + expect(page).to have_content(public_snippet.title) + expect(page).to have_content(internal_snippet.title) + expect(page).not_to have_content(private_snippet.title) + end +end -- cgit v1.2.1