2017-04-25 10:41:26 -04:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2017-06-29 00:13:10 -04:00
|
|
|
feature 'Internal Snippets', js: true 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
|
|
|
|
|
|
|
|
scenario 'sees internal snippets' do
|
|
|
|
visit snippet_path(internal_snippet)
|
|
|
|
|
|
|
|
expect(page).to have_content(internal_snippet.content)
|
|
|
|
end
|
|
|
|
|
|
|
|
scenario 'sees raw internal snippets' do
|
|
|
|
visit raw_snippet_path(internal_snippet)
|
|
|
|
|
|
|
|
expect(page).to have_content(internal_snippet.content)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|