Sha256: d29c24a8160c9b19e7129b1b38955899ec5cfb4f36ce896747e6d1608cb7951f

Contents?: true

Size: 581 Bytes

Versions: 3

Compression:

Stored size: 581 Bytes

Contents

module Authz
  RSpec.describe RoleHasBusinessProcess, type: :model do
    describe 'Associations' do
      it { should belong_to(:business_process) }
      it { should belong_to(:role) }
    end

    describe 'validations' do
      xit { should validate_presence_of(:business_process).with_message(:required) }
      xit { should validate_presence_of(:role).with_message(:required) }
      it do
        rhbp = create(:authz_role_has_business_process)
        expect(rhbp).to validate_uniqueness_of(:authz_business_process_id).scoped_to(:authz_role_id)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
authz-0.0.1.alpha4 spec/models/authz/role_has_business_process_spec.rb
authz-0.0.1.alpha3 spec/models/authz/role_has_business_process_spec.rb
authz-0.0.1.alpha2 spec/models/authz/role_has_business_process_spec.rb