2016-09-23 13:28:14 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-06-29 00:13:10 -04:00
|
|
|
describe 'Snippets' do
|
2016-09-23 13:28:14 -04:00
|
|
|
context 'when the project has snippets' do
|
2017-08-02 15:55:11 -04:00
|
|
|
let(:project) { create(:project, :public) }
|
2016-09-23 13:28:14 -04:00
|
|
|
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
|