mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Spec access denied to regular user when soft-deleting variants
This commit is contained in:
@@ -5,7 +5,7 @@ module Spree
|
||||
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.stub(:has_spree_role?).with("admin").and_return(true)
|
||||
|
||||
# Stub enterprises, needed for cancan ability checks
|
||||
user.stub(:enterprises) { [] }
|
||||
|
||||
Reference in New Issue
Block a user