Sha256: 41f4b80b7faa42946bf799d0eb1ea9764ddc28258cabde6a089952eeb162a0ba

Contents?: true

Size: 1.24 KB

Versions: 18

Compression:

Stored size: 1.24 KB

Contents

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

FactoryGirl.define do
  factory :app, class: MnoEnterprise::App do
    sequence(:id) { |n| n }
    sequence(:name) { |n| "TestApp#{n}" }
    nid { name.parameterize }
    
    description "This is a description"
    created_at 1.day.ago
    updated_at 2.hours.ago
    logo "https://cdn.somedomain.com/app/2f4g2r474.jpg"
    website "https://www.testapp.com"
    slug { "#{id}-myapp" }
    categories ["CRM"]
    tags ['Foo', 'Bar']
    key_benefits ['Super','Hyper','Good']
    key_features ['Super','Hyper','Good']
    testimonials [{text:'Bla', company:'Doe Pty Ltd', author: 'John'}]
    worldwide_usage 120000
    tiny_description "A great app"
    stack 'cube'
    terms_url "http://opensource.org/licenses/MIT"
    appinfo { {} }

    pricing_plans {{
      'default' =>[{name: 'Monthly Plan', price: '20.0', currency: 'AUD', factor: '/month'}]
    }}

    trait :cloud do
      stack 'cloud'
    end
  
    trait :connector do
      stack 'connector'
    end
  
    factory :cloud_app, traits: [:cloud]
    factory :connector_app, traits: [:connector]
    
    # Properly build the resource with Her
    initialize_with { new(attributes).tap { |e| e.clear_attribute_changes! } }
  end
  
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mno-enterprise-core-3.0.7 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-2.0.9 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-3.0.6 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-2.0.8 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-3.0.5 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-2.0.7 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-2.0.6 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-2.0.5 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-3.0.4 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-2.0.4 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-3.0.3 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-2.0.3 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-3.0.2 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-2.0.2 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-3.0.1 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-2.0.1 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-3.0.0 lib/mno_enterprise/testing_support/factories/apps.rb
mno-enterprise-core-2.0.0 lib/mno_enterprise/testing_support/factories/apps.rb