2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2017-11-21 21:50:03 +00:00
|
|
|
FactoryBot.define do
|
2017-06-16 20:43:09 +00:00
|
|
|
factory :role do
|
2019-03-27 09:01:36 +00:00
|
|
|
sequence(:name) { |n| "TestRole#{n}" }
|
|
|
|
created_by_id { 1 }
|
|
|
|
updated_by_id { 1 }
|
2019-01-15 12:55:59 +00:00
|
|
|
|
|
|
|
factory :agent_role do
|
|
|
|
permissions { Permission.where(name: 'ticket.agent') }
|
|
|
|
end
|
2020-09-14 06:34:42 +00:00
|
|
|
|
2020-10-29 14:43:14 +00:00
|
|
|
trait :customer do
|
|
|
|
permissions { Permission.where(name: 'ticket.customer') }
|
|
|
|
end
|
|
|
|
|
2020-09-14 06:34:42 +00:00
|
|
|
trait :admin do
|
|
|
|
permissions { Permission.where(name: 'admin') }
|
|
|
|
end
|
2017-06-16 20:43:09 +00:00
|
|
|
end
|
|
|
|
end
|