Sha256: 9916d2582518359e8b845e618109777c5b07d4e99e9547ae9cacb79ed210b28d

Contents?: true

Size: 898 Bytes

Versions: 24

Compression:

Stored size: 898 Bytes

Contents

# Read about factories at https://github.com/thoughtbot/factory_girl

FactoryGirl.define do
  factory :mno_enterprise_org_invite, :class => 'MnoEnterprise::OrgInvite' do
    
    factory :org_invite, class: MnoEnterprise::OrgInvite do
      sequence(:id) 
      sequence(:token) { |n| "dfhsohflsklddfdsJDasldnjsaHsnjdlsa#{n}" } 
      sequence(:user_email) { |n| "jack.doe#{n}@maestrano.com" }
      status "pending"
      user { build(:user).attributes }
      organization { build(:organization).attributes }
      referrer { build(:user).attributes }
      team { build(:team).attributes }
      user_role 'Member'
      
      created_at 1.days.ago
      updated_at 1.hour.ago
      
      # Properly build the resource with Her
      initialize_with { new(attributes).tap { |e| e.clear_attribute_changes! } }

      trait :expired do
        created_at 1.month.ago
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
mno-enterprise-core-3.3.2 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.2.1 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.3.1 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.3.0 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.2.0 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.1.4 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.0.7 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-2.0.9 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.1.3 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.0.6 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-2.0.8 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.1.2 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.0.5 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-2.0.7 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-2.0.6 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-2.0.5 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.1.1 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.0.4 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-2.0.4 lib/mno_enterprise/testing_support/factories/org_invite.rb
mno-enterprise-core-3.1.0 lib/mno_enterprise/testing_support/factories/org_invite.rb