debian-mirror-gitlab/spec/features/snippets_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
796 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2016-10-01 15:18:49 +05:30
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'Snippets' do
2016-10-01 15:18:49 +05:30
context 'when the project has snippets' do
2017-09-10 17:25:29 +05:30
let(:project) { create(:project, :public) }
2022-04-04 11:22:00 +05:30
let!(:snippets) { create_list(:project_snippet, 2, :public, author: project.first_owner, project: project) }
2020-01-01 13:55:28 +05:30
2016-10-01 15:18:49 +05:30
before do
allow(Snippet).to receive(:default_per_page).and_return(1)
2020-01-01 13:55:28 +05:30
visit project_snippets_path(project)
2016-10-01 15:18:49 +05:30
end
it_behaves_like 'paginated snippets'
end
2020-01-01 13:55:28 +05:30
describe 'rendering engine' do
let_it_be(:snippet) { create(:personal_snippet, :public) }
before do
visit snippet_path(snippet)
end
it 'renders Vue application' do
expect(page).to have_selector('#js-snippet-view')
expect(page).not_to have_selector('.personal-snippets')
end
end
2016-10-01 15:18:49 +05:30
end