Sha256: d07a8a3cb79af13a3cbd6eca941da38a12313c432fa53c9309ee132bf52965b1
Contents?: true
Size: 806 Bytes
Versions: 19
Compression:
Stored size: 806 Bytes
Contents
module Spree module Api module TestingSupport module Setup def sign_in_as_admin! let!(:current_api_user) do user = stub_model(Spree::LegacyUser) user.should_receive(:has_spree_role?).any_number_of_times.with("admin").and_return(true) user end end # Default kaminari's pagination to a certain range # Means that you don't need to create 25 objects to test pagination def default_per_page(count) before do @current_default_per_page = Kaminari.config.default_per_page Kaminari.config.default_per_page = 1 end after do Kaminari.config.default_per_page = @current_default_per_page end end end end end end
Version data entries
19 entries across 19 versions & 2 rubygems