Sha256: 14321f54ea22f6f881a36860d74d0ff8d3c78166727ba5bd8a4d872e5c8987c8

Contents?: true

Size: 699 Bytes

Versions: 30

Compression:

Stored size: 699 Bytes

Contents

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

FactoryGirl.define do
  factory :mno_enterprise_organization, :class => 'Organization' do
    
    factory :organization, class: MnoEnterprise::Organization do
      sequence(:id)
      sequence(:uid) { |n| "org-fab3#{n}" }
      name "Doe Inc"
      role "Admin"
      created_at 3.days.ago
      updated_at 1.hour.ago
      in_arrears? false
      billing_currency 'AUD'

      trait :with_org_invites do
        org_invites { [build(:org_invite).attributes] }
      end
      
      # Properly build the resource with Her
      initialize_with { new(attributes).tap { |e| e.clear_attribute_changes! } }
    end
    
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

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