3 class ErrorsTest < ActionDispatch::IntegrationTest
4 fixtures :api_client_authorizations
6 %w(/arvados/v1/shoes /arvados/shoes /shoes /nodes /users).each do |path|
7 test "non-existent route #{path}" do
8 get path, {:format => :json}, auth(:active)
9 assert_nil assigns(:objects)
10 assert_nil assigns(:object)
11 assert_not_nil json_response['errors']
17 Rails.application.routes.routes.each do |route|
18 test "route #{n += 1} '#{route.path.spec.to_s}' is not an accident" do
19 # Generally, new routes should appear under /arvados/v1/. If
20 # they appear elsewhere, that might have been caused by default
21 # rails generator behavior that we don't want.
22 assert_match(/^\/(|\*a|arvados\/v1\/.*|auth\/.*|login|logout|discovery\/.*|static\/.*|themes\/.*)(\(\.:format\))?$/,
24 "Unexpected new route: #{route.path.spec}")