debian-mirror-gitlab/spec/features/snippets/public_snippets_spec.rb

21 lines
530 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
require 'rails_helper'
2018-11-08 19:23:39 +05:30
describe 'Public Snippets', :js do
it 'Unauthenticated user should see public snippets' do
2017-08-17 22:00:37 +05:30
public_snippet = create(:personal_snippet, :public)
visit snippet_path(public_snippet)
2017-09-10 17:25:29 +05:30
wait_for_requests
2017-08-17 22:00:37 +05:30
expect(page).to have_content(public_snippet.content)
end
2018-11-08 19:23:39 +05:30
it 'Unauthenticated user should see raw public snippets' do
2017-08-17 22:00:37 +05:30
public_snippet = create(:personal_snippet, :public)
visit raw_snippet_path(public_snippet)
expect(page).to have_content(public_snippet.content)
end
end