mirror of
https://github.com/neocities/neocities.git
synced 2025-07-20 09:36:00 +02:00
error status codes, pretty output
This commit is contained in:
parent
edf5949747
commit
2ec6043af8
2 changed files with 29 additions and 21 deletions
|
@ -19,7 +19,14 @@ describe 'api info' do
|
|||
get '/api/info'
|
||||
res[:error_type] = 'missing_sitename'
|
||||
end
|
||||
|
||||
|
||||
it 'fails for banned sites' do
|
||||
create_site
|
||||
@site.update is_banned: true
|
||||
get '/api/info', sitename: @site.username
|
||||
res[:error_type].must_equal 'site_not_found'
|
||||
end
|
||||
|
||||
it 'fails for nonexistent site' do
|
||||
get '/api/info', sitename: 'notexist'
|
||||
res[:error_type].must_equal 'site_not_found'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue