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