Sha256: 35f50a00a6fd4c4ddae9dc52e4665491e114c6d8e1b0d1b2f26fb4ad91e80f93
Contents?: true
Size: 571 Bytes
Versions: 39
Compression:
Stored size: 571 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)) end should validate_uniqueness_of(:ansible_role_id).scoped_to(:host_id) end end
Version data entries
39 entries across 39 versions & 1 rubygems