Sha256: e5737e804a04f2934e40ceb9216a7619f479f4fe5073cad8ca28d256fe680844

Contents?: true

Size: 459 Bytes

Versions: 17

Compression:

Stored size: 459 Bytes

Contents

# frozen_string_literal: true

require 'test_plugin_helper'

# Tests for the behavior of Ansible Role, currently only validations
class AnsibleRoleTest < ActiveSupport::TestCase
  should have_many(:host_ansible_roles)
  should have_many(:hosts).through(:host_ansible_roles).dependent(:destroy)
  should validate_presence_of(:name)
  context 'with new role' do
    subject { AnsibleRole.new(:name => 'foo') }
    should validate_uniqueness_of(:name)
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
foreman_ansible-3.0.9 test/unit/ansible_variable_test.rb
foreman_ansible-3.0.8 test/unit/ansible_variable_test.rb
foreman_ansible-3.0.7 test/unit/ansible_variable_test.rb
foreman_ansible-3.0.6 test/unit/ansible_variable_test.rb
foreman_ansible-3.0.5 test/unit/ansible_variable_test.rb
foreman_ansible-3.0.4 test/unit/ansible_variable_test.rb
foreman_ansible-3.0.3 test/unit/ansible_variable_test.rb
foreman_ansible-2.3.6 test/unit/ansible_variable_test.rb
foreman_ansible-2.3.5 test/unit/ansible_variable_test.rb
foreman_ansible-2.3.4 test/unit/ansible_variable_test.rb
foreman_ansible-3.0.2 test/unit/ansible_variable_test.rb
foreman_ansible-3.0.1 test/unit/ansible_variable_test.rb
foreman_ansible-3.0.0 test/unit/ansible_variable_test.rb
foreman_ansible-2.3.3 test/unit/ansible_variable_test.rb
foreman_ansible-2.3.2 test/unit/ansible_variable_test.rb
foreman_ansible-2.3.1 test/unit/ansible_variable_test.rb
foreman_ansible-2.3.0 test/unit/ansible_variable_test.rb