lib/spree/api/testing_support/setup.rb in spree_api-1.1.6 vs lib/spree/api/testing_support/setup.rb in spree_api-1.2.0.rc1
- old
+ new
@@ -2,11 +2,11 @@
module Api
module TestingSupport
module Setup
def sign_in_as_admin!
let!(:current_api_user) do
- user = stub_model(Spree::User)
- user.should_receive(:has_role?).any_number_of_times.with("admin").and_return(true)
+ 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