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

17 lines
476 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'
2017-09-10 17:25:29 +05:30
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) }
2016-10-01 15:18:49 +05:30
let!(:snippets) { create_list(:project_snippet, 2, :public, author: project.owner, project: project) }
before do
allow(Snippet).to receive(:default_per_page).and_return(1)
visit snippets_path(username: project.owner.username)
end
it_behaves_like 'paginated snippets'
end
end