1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/spec/models/passport_spec.rb

34 lines
694 B
Ruby
Raw Normal View History

2018-11-29 20:19:38 -05:00
# frozen_string_literal: true
require 'rails_helper'
2018-11-30 02:00:03 -05:00
RSpec.describe Passport do
2018-12-02 11:44:02 -05:00
subject { create :empty_passport }
2018-11-29 20:19:38 -05:00
2019-07-18 14:44:46 -04:00
it_behaves_like 'nameable'
2019-07-20 06:07:02 -04:00
describe '#person' do
it { is_expected.to belong_to(:person).optional }
end
2018-12-02 09:16:16 -05:00
2019-07-20 06:07:02 -04:00
describe '#series' do
it { is_expected.to validate_presence_of :series }
end
describe '#number' do
it { is_expected.to validate_presence_of :number }
end
describe '#issued_by' do
it { is_expected.to validate_presence_of :issued_by }
end
describe '#unit_code' do
it { is_expected.to validate_presence_of :unit_code }
end
describe '#date_of_issue' do
it { is_expected.to validate_presence_of :date_of_issue }
end
2018-11-29 20:19:38 -05:00
end