Sha256: ba4d8da01c2d937c95ccac169faeb3dfa3422651d7031ec86a304d554d602371
Contents?: true
Size: 573 Bytes
Versions: 23
Compression:
Stored size: 573 Bytes
Contents
require 'test_plugin_helper' # Tests for validators and such of the join model between Hostgroup and # AnsibleRole class HostgroupAnsibleRoleTest < ActiveSupport::TestCase should belong_to(:hostgroup) should belong_to(:ansible_role) should validate_presence_of(:ansible_role_id) describe 'uniqueness' do subject do HostgroupAnsibleRole.new( :hostgroup => FactoryBot.build(:hostgroup), :ansible_role => FactoryBot.build(:ansible_role) ) end should validate_uniqueness_of(:ansible_role_id).scoped_to(:hostgroup_id) end end
Version data entries
23 entries across 23 versions & 1 rubygems