.circleci
.dependabot
.github
app
bin
config
db
dist
lib
log
nanobox
public
spec
controllers
fabricators
features
fixtures
helpers
lib
mailers
models
policies
presenters
requests
routing
accounts_routing_spec.rb
api_routing_spec.rb
well_known_routes_spec.rb
serializers
services
support
validators
views
workers
rails_helper.rb
spec_helper.rb
streaming
vendor
.buildpacks
.codeclimate.yml
.dockerignore
.editorconfig
.env.nanobox
.env.production.sample
.env.test
.env.vagrant
.eslintignore
.eslintrc.js
.foreman
.gitattributes
.gitignore
.haml-lint.yml
.nanoignore
.nvmrc
.profile
.rspec
.rubocop.yml
.ruby-version
.sass-lint.yml
.slugignore
.yarnclean
AUTHORS.md
Aptfile
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Capfile
Dockerfile
Gemfile
Gemfile.lock
LICENSE
Procfile
Procfile.dev
README.md
Rakefile
Vagrantfile
app.json
babel.config.js
boxfile.yml
config.ru
crowdin.yml
docker-compose.yml
package.json
postcss.config.js
priv-config
scalingo.json
yarn.lock
* Add routing specs for accounts followers and following actions * Use more restful route naming for public account follow pages Moves two actions: - accounts#followers to accounts/follower_accounts#index - accounts#following to accounts/following_accounts#index Adds routing spec to ensure prior URLs are preserved.
32 lines
1.1 KiB
Ruby
32 lines
1.1 KiB
Ruby
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
|