Refactor tests to use the json extension instead of headers.

This commit is contained in:
Guo Xiang Tan
2018-05-21 09:49:46 +08:00
parent 1841dd48dc
commit 2ceb107074
2 changed files with 19 additions and 20 deletions

View File

@ -213,9 +213,9 @@ Discourse::Application.routes.draw do
# They have periods in their URLs often:
get 'site_texts' => 'site_texts#index'
get 'site_texts/(:id)' => 'site_texts#show', constraints: { id: /[\w.\-\+]+/i }
put 'site_texts/(:id)' => 'site_texts#update', constraints: { id: /[\w.\-\+]+/i }
delete 'site_texts/(:id)' => 'site_texts#revert', constraints: { id: /[\w.\-\+]+/i }
get 'site_texts/:id' => 'site_texts#show', constraints: { id: /[\w.\-\+]+/i }
put 'site_texts/:id.json' => 'site_texts#update', constraints: { id: /[\w.\-\+]+/i }
delete 'site_texts/:id' => 'site_texts#revert', constraints: { id: /[\w.\-\+]+/i }
get 'email_templates' => 'email_templates#index'
get 'email_templates/(:id)' => 'email_templates#show', constraints: { id: /[0-9a-z_.]+/ }