GitLab steht Mittwoch, den 08. Juli, zwischen 09:00 und 13:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

snippets_spec.rb 445 Bytes
Newer Older
Rémy Coutable's avatar
Rémy Coutable committed
1 2
require 'spec_helper'

3
describe 'Snippets' do
Rémy Coutable's avatar
Rémy Coutable committed
4
  context 'when the project has snippets' do
5
    let(:project) { create(:project, :public) }
Rémy Coutable's avatar
Rémy Coutable committed
6 7 8 9 10 11 12 13 14
    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