mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Apply suggestions from code review
This commit is contained in:
@@ -34,6 +34,8 @@ RSpec.describe Spree::Ability do
|
||||
let(:fakedispatch_ability) { Spree::Ability.new(fakedispatch_user) }
|
||||
|
||||
context 'with admin user' do
|
||||
let(:user) { create(:admin_user) }
|
||||
|
||||
it 'should be able to admin' do
|
||||
user.update!(admin: true)
|
||||
expect(subject).to be_able_to :admin, resource
|
||||
@@ -785,7 +787,7 @@ RSpec.describe Spree::Ability do
|
||||
let(:manage_actions) { [:admin, :index, :read, :update, :bulk_update, :bulk_reset] }
|
||||
|
||||
describe "when admin" do
|
||||
before { user.update!(admin: true) }
|
||||
let(:user) { create(:admin_user) }
|
||||
|
||||
it "should have permission" do
|
||||
is_expected.to have_ability(manage_actions, for: variant_override)
|
||||
|
||||
Reference in New Issue
Block a user