Sha256: c54603b597cd7174cd8ef12549bc6742f439eba12b82672b6ddbef32f548003f
Contents?: true
Size: 575 Bytes
Versions: 14
Compression:
Stored size: 575 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 => FactoryGirl.build(:hostgroup), :ansible_role => FactoryGirl.build(:ansible_role) ) end should validate_uniqueness_of(:ansible_role_id).scoped_to(:hostgroup_id) end end
Version data entries
14 entries across 14 versions & 1 rubygems