You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
506 B

  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe Mention, type: :model 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