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/person_comment_spec.rb

23 lines
445 B
Ruby
Raw Normal View History

2019-07-15 17:19:11 -04:00
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe PersonComment do
subject { create :person_comment }
it { is_expected.to belong_to(:person).required }
it { is_expected.to belong_to(:account).optional }
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