Sha256: ef8862a4877d71d147fe88958e555b290f07f5f3fcc6494c5e6aaf36ea423e2c

Contents?: true

Size: 607 Bytes

Versions: 105

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

require 'test_plugin_helper'
# unit tests for RolesImporter
class RolesImporterTest < ActiveSupport::TestCase
  setup do
    @role = FactoryBot.create(:ansible_role)
    @importer = ForemanAnsible::RolesImporter.new
  end

  test 'should detect changes when importing roles' do
    role = FactoryBot.build(:ansible_role)
    changes = @importer.detect_changes [role]
    assert_equal 1, changes[:new].length
    assert_equal 1, changes[:obsolete].length
    assert_equal role.name, changes[:new].first.name
    assert_equal @role.name, changes[:obsolete].first.name
  end
end

Version data entries

105 entries across 105 versions & 1 rubygems

Version Path
foreman_ansible-6.3.3 test/unit/services/roles_importer_test.rb
foreman_ansible-6.3.2 test/unit/services/roles_importer_test.rb
foreman_ansible-6.3.1 test/unit/services/roles_importer_test.rb
foreman_ansible-6.4.1 test/unit/services/roles_importer_test.rb
foreman_ansible-6.4.0 test/unit/services/roles_importer_test.rb
foreman_ansible-6.3.0 test/unit/services/roles_importer_test.rb
foreman_ansible-6.2.0 test/unit/services/roles_importer_test.rb
foreman_ansible-6.1.1 test/unit/services/roles_importer_test.rb
foreman_ansible-6.0.2 test/unit/services/roles_importer_test.rb
foreman_ansible-6.1.0 test/unit/services/roles_importer_test.rb
foreman_ansible-6.0.1 test/unit/services/roles_importer_test.rb
foreman_ansible-5.1.3 test/unit/services/roles_importer_test.rb
foreman_ansible-6.0.0 test/unit/services/roles_importer_test.rb
foreman_ansible-5.1.2 test/unit/services/roles_importer_test.rb
foreman_ansible-5.1.1 test/unit/services/roles_importer_test.rb
foreman_ansible-5.1.0 test/unit/services/roles_importer_test.rb
foreman_ansible-4.0.3.5 test/unit/services/roles_importer_test.rb
foreman_ansible-4.0.3.4 test/unit/services/roles_importer_test.rb
foreman_ansible-4.0.3.3 test/unit/services/roles_importer_test.rb
foreman_ansible-4.0.3.2 test/unit/services/roles_importer_test.rb