BigW Consortium Gitlab

public_snippets_spec.rb 556 Bytes
Newer Older
1 2
require 'rails_helper'

3
feature 'Public Snippets', :js, feature: true do
4 5 6 7
  scenario 'Unauthenticated user should see public snippets' do
    public_snippet = create(:personal_snippet, :public)

    visit snippet_path(public_snippet)
8
    wait_for_requests
9 10 11 12 13 14 15 16 17 18 19 20

    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