Files
leadchat/spec/factories/custom_roles.rb
Sojan Jose d6fd3ce048 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.
2024-09-04 16:13:29 -07:00

9 lines
226 B
Ruby

FactoryBot.define do
factory :custom_role do
account
name { Faker::Name.name }
description { Faker::Lorem.sentence }
permissions { CustomRole::PERMISSIONS.sample(SecureRandom.random_number(1..4)) }
end
end