Sha256: 05f13df2f00554ab06e6e0e0979e6bf4149bf4bb85622512761fa3a0257a8611

Contents?: true

Size: 596 Bytes

Versions: 1

Compression:

Stored size: 596 Bytes

Contents

require 'spec_helper'

describe OccupationBaseGroup do
  it { is_expected.to be_a_kind_of Unico::OccupationBaseGroup }

  it { is_expected.to belong_to(:occupation_subgroup) }
  it { is_expected.to have_many(:occupation_classifications).dependent(:restrict_with_exception) }

  it { is_expected.to validate_presence_of :name }
  it { is_expected.to validate_presence_of :code }

  it 'cast to string using the code and name' do
    subject.code = '0101'
    subject.name = 'Oficiais generais das forças armadas'

    expect(subject.to_s).to eq '0101 - Oficial General da Aeronáutica'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unico-training-7.8.0 spec/models/occupation_base_group_spec.rb