gitlab-org--gitlab-foss/spec/features/snippets/public_snippets_spec.rb

21 lines
556 B
Ruby
Raw Normal View History

require 'rails_helper'
2017-04-13 12:47:28 -04:00
feature 'Public Snippets', :js, feature: true do
scenario 'Unauthenticated user should see public snippets' do
public_snippet = create(:personal_snippet, :public)
visit snippet_path(public_snippet)
wait_for_requests
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