logo

mastofe

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

accounts_routing_spec.rb (1112B)


  1. require 'rails_helper'
  2. describe 'Routes under accounts/' do
  3. describe 'the route for accounts who are followers of an account' do
  4. it 'routes to the followers action with the right username' do
  5. expect(get('/users/name/followers')).
  6. to route_to('follower_accounts#index', account_username: 'name')
  7. end
  8. end
  9. describe 'the route for accounts who are followed by an account' do
  10. it 'routes to the following action with the right username' do
  11. expect(get('/users/name/following')).
  12. to route_to('following_accounts#index', account_username: 'name')
  13. end
  14. end
  15. describe 'the route for following an account' do
  16. it 'routes to the follow create action with the right username' do
  17. expect(post('/users/name/follow')).
  18. to route_to('account_follow#create', account_username: 'name')
  19. end
  20. end
  21. describe 'the route for unfollowing an account' do
  22. it 'routes to the unfollow create action with the right username' do
  23. expect(post('/users/name/unfollow')).
  24. to route_to('account_unfollow#create', account_username: 'name')
  25. end
  26. end
  27. end