Sha256: f15d533a0541128ba0c6eeef1180b6b959f715121860d49bf03c748d369a961e
Contents?: true
Size: 966 Bytes
Versions: 91
Compression:
Stored size: 966 Bytes
Contents
# frozen_string_literal: true require 'test_helper' require 'facets' def ansible_fixture_file(filename) File.join( ForemanAnsible::Engine.root, 'test', 'fixtures', filename ) end def sample_facts_file File.read( ansible_fixture_file('sample_facts.json') ) end def facts_json HashWithIndifferentAccess.new(JSON.parse(sample_facts_file)) end def assert_job_invocation_is_ok(response, targets) as_admin do targeting = JobInvocation.find(response['id']).targeting targeting.resolve_hosts! assert_equal [targets].flatten.sort, targeting.hosts.map(&:id).sort end assert_equal 'Ansible Playbook', response['job_category'] assert_response :created end plugin_factories_path = File.join(File.dirname(__FILE__), 'factories') rex_factories_path = "#{ForemanRemoteExecution::Engine.root}/test/factories" FactoryBot.definition_file_paths << rex_factories_path FactoryBot.definition_file_paths << plugin_factories_path FactoryBot.reload
Version data entries
91 entries across 91 versions & 1 rubygems