Sha256: a409b4f4820ee064e356c6dc4b06ad97d9f7b8fb29965664f0645a18682747a0

Contents?: true

Size: 275 Bytes

Versions: 4

Compression:

Stored size: 275 Bytes

Contents

# frozen_string_literal: true

FactoryBot.modify do
  factory :country do
    trait :with_states do
      after :create do |country|
        create(:state, id: 1, country: country)
        create(:state, id: 2, country: country, state_code: 'CA')
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_graphql_api-0.3.1 lib/solidus_graphql_api/testing_support/factories/country_factory.rb
solidus_graphql_api-0.3.0 lib/solidus_graphql_api/testing_support/factories/country_factory.rb
solidus_graphql_api-0.2.0 lib/solidus_graphql_api/testing_support/factories/country_factory.rb
solidus_graphql_api-0.1.0 lib/solidus_graphql_api/factories/country_factory.rb