2019-07-25 01:24:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-08-29 03:56:52 -04:00
|
|
|
require 'spec_helper'
|
2017-04-25 10:41:26 -04:00
|
|
|
|
2018-07-05 02:32:05 -04:00
|
|
|
describe 'Internal Snippets', :js do
|
2017-04-25 10:41:26 -04:00
|
|
|
let(:internal_snippet) { create(:personal_snippet, :internal) }
|
|
|
|
|
|
|
|
describe 'normal user' do
|
|
|
|
before do
|
2017-06-21 19:44:10 -04:00
|
|
|
sign_in(create(:user))
|
2017-04-25 10:41:26 -04:00
|
|
|
end
|
|
|
|
|
2018-07-05 02:32:05 -04:00
|
|
|
it 'sees internal snippets' do
|
2017-04-25 10:41:26 -04:00
|
|
|
visit snippet_path(internal_snippet)
|
|
|
|
|
|
|
|
expect(page).to have_content(internal_snippet.content)
|
|
|
|
end
|
|
|
|
|
2018-07-05 02:32:05 -04:00
|
|
|
it 'sees raw internal snippets' do
|
2017-04-25 10:41:26 -04:00
|
|
|
visit raw_snippet_path(internal_snippet)
|
|
|
|
|
|
|
|
expect(page).to have_content(internal_snippet.content)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|