test.rb 1.9 KB

1234567891011121314151617181920212223242526272829303132
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. if !Rails.env.production?
  3. Zammad::Application.routes.draw do
  4. get '/tests_:name', to: 'tests#show'
  5. match '/tests/wait/:sec', to: 'tests#wait', via: :get
  6. match '/tests/raised_exception', to: 'tests#error_raised_exception', via: :get
  7. # user agent tests
  8. match 'test/get/:sec', to: 'user_agent_test#get', via: %i[get options]
  9. match 'test/get_accepted/:sec', to: 'user_agent_test#accepted', via: :get
  10. match 'test/redirect', to: 'user_agent_test#redirect', via: :get
  11. match 'test/post/:sec', to: 'user_agent_test#post', via: :post
  12. match 'test/put/:sec', to: 'user_agent_test#put', via: :put
  13. match 'test/delete/:sec', to: 'user_agent_test#delete', via: :delete
  14. # user agent tests with basic auth
  15. match 'test_basic_auth/get/:sec', to: 'user_agent_test_basic_auth#get', via: %i[get options]
  16. match 'test_basic_auth/post/:sec', to: 'user_agent_test_basic_auth#post', via: :post
  17. match 'test_basic_auth/put/:sec', to: 'user_agent_test_basic_auth#put', via: :put
  18. match 'test_basic_auth/delete/:sec', to: 'user_agent_test_basic_auth#delete', via: :delete
  19. match 'test_basic_auth/redirect', to: 'user_agent_test_basic_auth#redirect', via: :get
  20. # user agent tests with bearer token auth
  21. match 'test_bearer_auth/get/:sec', to: 'user_agent_test_bearer_auth#get', via: %i[get options]
  22. match 'test_bearer_auth/post/:sec', to: 'user_agent_test_bearer_auth#post', via: :post
  23. match 'test_bearer_auth/put/:sec', to: 'user_agent_test_bearer_auth#put', via: :put
  24. match 'test_bearer_auth/delete/:sec', to: 'user_agent_test_bearer_auth#delete', via: :delete
  25. match 'test_bearer_auth/redirect', to: 'user_agent_test_bearer_auth#redirect', via: :get
  26. end
  27. end