diff options
author | the-undefined <joe@joejames.io> | 2016-11-03 09:34:52 +0300 |
---|---|---|
committer | the-undefined <joe@joejames.io> | 2016-11-04 09:58:40 +0300 |
commit | 27528d4490804c4bf5e16f44d12f9825cf7c6cef (patch) | |
tree | f1b01294fb8f4d6fee2e806e8b67d7fc9843df7b /spec/features/snippets/public_snippets_spec.rb | |
parent | b27de4abbb6dc4566f1b18d7205bfad6dda5f10f (diff) |
Move spinach public snippet feature to rspec spec
- Add rspec feature for public snippets
- Remove spinach test for public snippets
Diffstat (limited to 'spec/features/snippets/public_snippets_spec.rb')
-rw-r--r-- | spec/features/snippets/public_snippets_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/snippets/public_snippets_spec.rb b/spec/features/snippets/public_snippets_spec.rb new file mode 100644 index 00000000000..34300ccb940 --- /dev/null +++ b/spec/features/snippets/public_snippets_spec.rb @@ -0,0 +1,19 @@ +require 'rails_helper' + +feature 'Public Snippets', feature: true do + scenario 'Unauthenticated user should see public snippets' do + public_snippet = create(:personal_snippet, :public) + + visit snippet_path(public_snippet) + + expect(page).to have_content(public_snippet.content) + end + + scenario 'Unauthenticated user should see raw public snippets' do + public_snippet = create(:personal_snippet, :public) + + visit raw_snippet_path(public_snippet) + + expect(page).to have_content(public_snippet.content) + end +end |