The code powering m.abunchtell.com https://m.abunchtell.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

26 satır
756 B

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