chore: Fix flaky permissions test (#10074)
- the permissions tests were failing when the random number turns out to be 0, fixing this case and ensuring that its always between, 1-4.
This commit is contained in:
@@ -3,6 +3,6 @@ FactoryBot.define do
|
||||
account
|
||||
name { Faker::Name.name }
|
||||
description { Faker::Lorem.sentence }
|
||||
permissions { CustomRole::PERMISSIONS.sample(SecureRandom.random_number(4)) }
|
||||
permissions { CustomRole::PERMISSIONS.sample(SecureRandom.random_number(1..4)) }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user