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

23 lines
560 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'spec_helper'
2018-07-05 02:32:05 -04:00
describe 'Public Snippets', :js do
it '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
2018-07-05 02:32:05 -04:00
it '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