The code powering m.abunchtell.com https://m.abunchtell.com
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

23 lignes
595 B

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