summaryrefslogtreecommitdiff
path: root/spec/features/snippets_spec.rb
blob: 70b16bfc810e55b51905744a9d1a5b034b9cdb10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'spec_helper'

describe 'Snippets', feature: true do
  context 'when the project has snippets' do
    let(:project) { create(:empty_project, :public) }
    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