Sha256: 14d1b23535b9de7d16f6291c44f031bec90e8218f4da6af4b8ce07edf839933c

Contents?: true

Size: 515 Bytes

Versions: 5

Compression:

Stored size: 515 Bytes

Contents

FactoryGirl.define do
  factory :mno_enterprise_audit_event, :class => 'AuditEvent' do

    factory :audit_event, class: MnoEnterprise::AuditEvent do
      sequence(:key) { |n| "event-fab3#{n}" }
      user_id 1
      description 'Blabla'
      details 'Details'
      organization_id 1
      organization { {name: 'Org'} }
      user { {name: 'John', surname: 'Doe'} }

      # Properly build the resource with Her
      initialize_with { new(attributes).tap { |e| e.clear_attribute_changes! } }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mno-enterprise-core-3.4.0 lib/mno_enterprise/testing_support/factories/audit_event.rb
mno-enterprise-core-3.3.3 lib/mno_enterprise/testing_support/factories/audit_event.rb
mno-enterprise-core-3.3.2 lib/mno_enterprise/testing_support/factories/audit_event.rb
mno-enterprise-core-3.3.1 lib/mno_enterprise/testing_support/factories/audit_event.rb
mno-enterprise-core-3.3.0 lib/mno_enterprise/testing_support/factories/audit_event.rb