mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
For some reason the factory create(:admin_user) is not working here, this new version works
This commit is contained in:
@@ -726,7 +726,7 @@ describe Spree::Ability do
|
||||
let(:manage_actions) { [:admin, :index, :read, :update, :bulk_update, :bulk_reset] }
|
||||
|
||||
describe "when admin" do
|
||||
let(:user) { create(:admin_user) }
|
||||
before { user.spree_roles << Spree::Role.find_or_create_by!(name: 'admin') }
|
||||
|
||||
it "should have permission" do
|
||||
is_expected.to have_ability(manage_actions, for: variant_override)
|
||||
|
||||
Reference in New Issue
Block a user