gitlab-org--gitlab-foss/spec/controllers/explore/snippets_controller_spec.rb
Markus Koller f1926b321d
Add controller concern for paginated collections
We had similar code in a few places to redirect to the last page if
the given page number is out of range. This unifies the handling in a
new controller concern and adds usage of it in all snippet listings.
2019-09-10 15:24:29 +02:00

15 lines
294 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe Explore::SnippetsController do
describe 'GET #index' do
it_behaves_like 'paginated collection' do
let(:collection) { Snippet.all }
before do
create(:personal_snippet, :public)
end
end
end
end