logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

follower_accounts_controller_spec.rb (651B)


  1. require 'rails_helper'
  2. describe FollowerAccountsController do
  3. render_views
  4. let(:alice) { Fabricate(:account, username: 'alice') }
  5. let(:follower0) { Fabricate(:account) }
  6. let(:follower1) { Fabricate(:account) }
  7. describe 'GET #index' do
  8. it 'assigns follows' do
  9. follow0 = follower0.follow!(alice)
  10. follow1 = follower1.follow!(alice)
  11. get :index, params: { account_username: alice.username }
  12. assigned = assigns(:follows).to_a
  13. expect(assigned.size).to eq 2
  14. expect(assigned[0]).to eq follow1
  15. expect(assigned[1]).to eq follow0
  16. expect(response).to have_http_status(:success)
  17. end
  18. end
  19. end