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-12.0.5 test/factories/ansible_variables.rb
foreman_ansible-10.4.3 test/factories/ansible_variables.rb
foreman_ansible-12.0.4 test/factories/ansible_variables.rb
foreman_ansible-10.4.2 test/factories/ansible_variables.rb
foreman_ansible-12.0.3 test/factories/ansible_variables.rb
foreman_ansible-12.0.2 test/factories/ansible_variables.rb
foreman_ansible-12.0.1 test/factories/ansible_variables.rb
foreman_ansible-12.0.0 test/factories/ansible_variables.rb
foreman_ansible-11.2.1 test/factories/ansible_variables.rb
foreman_ansible-7.1.7 test/factories/ansible_variables.rb
foreman_ansible-11.2.0 test/factories/ansible_variables.rb
foreman_ansible-11.1.2 test/factories/ansible_variables.rb
foreman_ansible-7.1.6 test/factories/ansible_variables.rb
foreman_ansible-11.1.1 test/factories/ansible_variables.rb
foreman_ansible-10.4.1 test/factories/ansible_variables.rb
foreman_ansible-7.1.5 test/factories/ansible_variables.rb
foreman_ansible-11.1.0 test/factories/ansible_variables.rb
foreman_ansible-10.4.0 test/factories/ansible_variables.rb
foreman_ansible-10.3.0 test/factories/ansible_variables.rb
foreman_ansible-11.0.0 test/factories/ansible_variables.rb