mention_spec.rb 492 B

12345678910111213141516171819
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe Mention do
  4. describe 'validations' do
  5. it 'is invalid without an account' do
  6. mention = Fabricate.build(:mention, account: nil)
  7. mention.valid?
  8. expect(mention).to model_have_error_on_field(:account)
  9. end
  10. it 'is invalid without a status' do
  11. mention = Fabricate.build(:mention, status: nil)
  12. mention.valid?
  13. expect(mention).to model_have_error_on_field(:status)
  14. end
  15. end
  16. end