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-5.0.1 test/unit/services/roles_importer_test.rb
foreman_ansible-4.0.5 test/unit/services/roles_importer_test.rb
foreman_ansible-4.0.3.1 test/unit/services/roles_importer_test.rb
foreman_ansible-4.0.4 test/unit/services/roles_importer_test.rb
foreman_ansible-5.0.0 test/unit/services/roles_importer_test.rb
foreman_ansible-4.0.3 test/unit/services/roles_importer_test.rb
foreman_ansible-4.0.2 test/unit/services/roles_importer_test.rb
foreman_ansible-4.0.0 test/unit/services/roles_importer_test.rb
foreman_ansible-3.0.9 test/unit/services/roles_importer_test.rb
foreman_ansible-3.0.8 test/unit/services/roles_importer_test.rb
foreman_ansible-3.0.7 test/unit/services/roles_importer_test.rb
foreman_ansible-3.0.6 test/unit/services/roles_importer_test.rb
foreman_ansible-3.0.5 test/unit/services/roles_importer_test.rb
foreman_ansible-3.0.4 test/unit/services/roles_importer_test.rb
foreman_ansible-3.0.3 test/unit/services/roles_importer_test.rb
foreman_ansible-2.3.6 test/unit/services/roles_importer_test.rb
foreman_ansible-2.3.5 test/unit/services/roles_importer_test.rb
foreman_ansible-2.3.4 test/unit/services/roles_importer_test.rb
foreman_ansible-3.0.2 test/unit/services/roles_importer_test.rb
foreman_ansible-3.0.1 test/unit/services/roles_importer_test.rb