Sha256: 53cbb0d12f8444c4f75ed57564ef223dadd1f1c35bfc9a4f24c15de7586b0371
Contents?: true
Size: 597 Bytes
Versions: 15
Compression:
Stored size: 597 Bytes
Contents
# frozen_string_literal: true FactoryGirl.define do factory :api_subject, class: API::APISubject do x509_cn { Faker::Lorem.word } description { Faker::Lorem.sentence } contact_name { Faker::Name.name } contact_mail { Faker::Internet.email } enabled true trait :authorized do transient { permission '*' } after(:create) do |api_subject, attrs| role = create :role permission = create :permission, value: attrs.permission, role: role role.permissions << permission role.api_subjects << api_subject end end end end
Version data entries
15 entries across 15 versions & 1 rubygems