Sha256: 4da34d954c2a17d24a8fbb6378c44eb833448de55458b5acbbeaa9fe541d0b72

Contents?: true

Size: 642 Bytes

Versions: 15

Compression:

Stored size: 642 Bytes

Contents

# frozen_string_literal: true

FactoryGirl.define do
  factory :subject do
    name { Faker::Name.name }
    mail { Faker::Internet.email }
    enabled true
    complete true

    shared_token { SecureRandom.urlsafe_base64(16) }
    targeted_id do
      "https://rapid.example.com!https://ide.example.com!#{SecureRandom.hex}"
    end

    trait :authorized do
      transient { permission '*' }

      after(:create) do |subject, attrs|
        role = create :role
        permission = create :permission, value: attrs.permission, role: role
        role.permissions << permission
        role.subjects << subject
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
aaf-gumboot-2.6.3 spec/factories/subjects.rb
aaf-gumboot-2.6.2 spec/factories/subjects.rb
aaf-gumboot-2.6.1 spec/factories/subjects.rb
aaf-gumboot-2.6.0 spec/factories/subjects.rb
aaf-gumboot-2.5.1 spec/factories/subjects.rb
aaf-gumboot-2.5.0 spec/factories/subjects.rb
aaf-gumboot-2.4.0 spec/factories/subjects.rb
aaf-gumboot-2.2.0 spec/factories/subjects.rb
aaf-gumboot-2.1.4 spec/factories/subjects.rb
aaf-gumboot-2.1.3 spec/factories/subjects.rb
aaf-gumboot-2.1.1 spec/factories/subjects.rb
aaf-gumboot-2.1.0 spec/factories/subjects.rb
aaf-gumboot-2.0.1 spec/factories/subjects.rb
aaf-gumboot-1.2.0 spec/factories/subjects.rb
aaf-gumboot-1.1.0 spec/factories/subjects.rb