Sha256: c6e9f8fd629aa90f27b19d80fee751b97fb0eb9bf3f8952fca3299640723686e

Contents?: true

Size: 858 Bytes

Versions: 30

Compression:

Stored size: 858 Bytes

Contents

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

FactoryGirl.define do
  factory :mno_enterprise_app_instance, :class => 'AppInstance' do
    
    factory :app_instance, class: MnoEnterprise::AppInstance do
      sequence(:id) 
      sequence(:uid) { |n| "bla#{1}.mcube.co" } 
      name "SomeApp"
      status "running"
      created_at 3.days.ago 
      updated_at 1.hour.ago 
      started_at 3.days.ago
      stack "cube"
      terminated_at nil
      stopped_at nil
      billing_type "hourly"
      autostop_at nil
      autostop_interval nil
      next_status nil
      soa_enabled true
      
      app { build(:app).attributes }
      owner { build(:organization).attributes }
      
      # 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/app_instances.rb
mno-enterprise-core-3.3.3 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.3.2 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.2.1 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.3.1 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.3.0 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.2.0 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.1.4 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.0.7 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-2.0.9 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.1.3 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.0.6 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-2.0.8 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.1.2 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.0.5 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-2.0.7 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-2.0.6 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-2.0.5 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.1.1 lib/mno_enterprise/testing_support/factories/app_instances.rb
mno-enterprise-core-3.0.4 lib/mno_enterprise/testing_support/factories/app_instances.rb