Sha256: e97dd28eeeb54c779b0dd8780d244b2b0b7b1572a2bb0850b86d9c8adcca93f7

Contents?: true

Size: 430 Bytes

Versions: 75

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :ansible_variable do
    sequence(:key) { |n| "ansible_variable_#{n}" }
    sequence(:default_value) { |n| "default_value_#{n}" }
    ansible_role
    imported { true }
    override { false }

    after(:build) do |variable|
      variable.key_type ||= ForemanAnsible::VariablesImporter::VARIABLE_TYPES[variable.default_value.class.to_s] || 'string'
    end
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
foreman_ansible-15.0.2 test/factories/ansible_variables.rb
foreman_ansible-15.0.1 test/factories/ansible_variables.rb
foreman_ansible-15.0.0 test/factories/ansible_variables.rb
foreman_ansible-14.2.2 test/factories/ansible_variables.rb
foreman_ansible-14.2.1 test/factories/ansible_variables.rb
foreman_ansible-13.0.7 test/factories/ansible_variables.rb
foreman_ansible-14.2.0 test/factories/ansible_variables.rb
foreman_ansible-14.1.1 test/factories/ansible_variables.rb
foreman_ansible-14.1.0 test/factories/ansible_variables.rb
foreman_ansible-13.0.5 test/factories/ansible_variables.rb
foreman_ansible-14.0.0 test/factories/ansible_variables.rb
foreman_ansible-13.0.4 test/factories/ansible_variables.rb
foreman_ansible-13.0.3 test/factories/ansible_variables.rb
foreman_ansible-13.0.2 test/factories/ansible_variables.rb
foreman_ansible-13.0.1 test/factories/ansible_variables.rb
foreman_ansible-13.0.0 test/factories/ansible_variables.rb
foreman_ansible-12.0.7 test/factories/ansible_variables.rb
foreman_ansible-10.4.4 test/factories/ansible_variables.rb
foreman_ansible-7.1.8 test/factories/ansible_variables.rb
foreman_ansible-12.0.6 test/factories/ansible_variables.rb