Sha256: 0f03b182e69eaeb20d0062d5bb572c7f0ee8f0a7bed66aed2bf1083906df9f69
Contents?: true
Size: 613 Bytes
Versions: 61
Compression:
Stored size: 613 Bytes
Contents
# frozen_string_literal: true 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 => FactoryBot.build(:host), :ansible_role => FactoryBot.build(:ansible_role), :position => 0) end should validate_uniqueness_of(:ansible_role_id).scoped_to(:host_id) end end
Version data entries
61 entries across 61 versions & 1 rubygems