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

24 lines
534 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
require 'rails_helper'
2018-03-17 18:26:18 +05:30
feature 'Internal Snippets', :js do
2017-08-17 22:00:37 +05:30
let(:internal_snippet) { create(:personal_snippet, :internal) }
describe 'normal user' do
before do
2017-09-10 17:25:29 +05:30
sign_in(create(:user))
2017-08-17 22:00:37 +05:30
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