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

27 lines
510 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
RSpec.describe PersonComment do
subject { create :person_comment }
describe '#person' do
it { is_expected.to belong_to(:person).required }
end
describe '#account' do
it { is_expected.to belong_to(:account).optional }
end
describe '#text' do
it { is_expected.to validate_presence_of :text }
it do
is_expected.to \
validate_length_of(:text)
.is_at_least(1)
.is_at_most(10_000)
end
end
end