Sha256: f225d13520e402995d28753ff4c302fbc0b52c020ae5c0871591f187ccb858b7

Contents?: true

Size: 542 Bytes

Versions: 14

Compression:

Stored size: 542 Bytes

Contents

require 'test_plugin_helper'

# Tests for validators and such of the join model between Host and
# AnsibleRole
class HostAnsibleRoleTest < ActiveSupport::TestCase
  should belong_to(:host)
  should belong_to(:ansible_role)
  should validate_presence_of(:ansible_role_id)

  describe 'uniqueness' do
    subject do
      HostAnsibleRole.new(:host => FactoryGirl.build(:host),
                          :ansible_role => FactoryGirl.build(:ansible_role))
    end
    should validate_uniqueness_of(:ansible_role_id).scoped_to(:host_id)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
foreman_ansible-1.5.2 test/unit/host_ansible_role_test.rb
foreman_ansible-1.5.1 test/unit/host_ansible_role_test.rb
foreman_ansible-1.5.0 test/unit/host_ansible_role_test.rb
foreman_ansible-1.4.6 test/unit/host_ansible_role_test.rb
foreman_ansible-1.4.5 test/unit/host_ansible_role_test.rb
foreman_ansible-1.4.3 test/unit/host_ansible_role_test.rb
foreman_ansible-1.4.2 test/unit/host_ansible_role_test.rb
foreman_ansible-1.4.1 test/unit/host_ansible_role_test.rb
foreman_ansible-1.4.0 test/unit/host_ansible_role_test.rb
foreman_ansible-1.3.1 test/unit/host_ansible_role_test.rb
foreman_ansible-1.3.0 test/unit/host_ansible_role_test.rb
foreman_ansible-1.2.1 test/unit/host_ansible_role_test.rb
foreman_ansible-1.2 test/unit/host_ansible_role_test.rb
foreman_ansible-1.1 test/unit/host_ansible_role_test.rb