summaryrefslogtreecommitdiff
path: root/spec/features/snippets
diff options
context:
space:
mode:
authorthe-undefined <joe@joejames.io>2016-11-03 06:34:52 +0000
committerthe-undefined <joe@joejames.io>2016-11-04 06:58:40 +0000
commit27528d4490804c4bf5e16f44d12f9825cf7c6cef (patch)
treef1b01294fb8f4d6fee2e806e8b67d7fc9843df7b /spec/features/snippets
parentb27de4abbb6dc4566f1b18d7205bfad6dda5f10f (diff)
downloadgitlab-ce-27528d4490804c4bf5e16f44d12f9825cf7c6cef.tar.gz
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')
-rw-r--r--spec/features/snippets/public_snippets_spec.rb19
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