gitlab-org--gitlab-foss/spec/features/projects/snippets/user_views_snippets_spec.rb
2017-09-18 18:52:28 +11:00

20 lines
516 B
Ruby

require 'spec_helper'
describe 'User views snippets' do
let(:project) { create(:project) }
let!(:project_snippet) { create(:project_snippet, project: project, author: user) }
let!(:snippet) { create(:snippet, author: user) }
let(:user) { create(:user) }
before do
project.add_master(user)
sign_in(user)
visit(project_snippets_path(project))
end
it 'shows snippets' do
expect(page).to have_content(project_snippet.title)
expect(page).not_to have_content(snippet.title)
end
end