mirror of
https://github.com/neocities/neocities.git
synced 2025-08-04 00:31:59 +02:00
fix tests for new code
This commit is contained in:
parent
80b3f6b0be
commit
d5493d4d23
3 changed files with 5 additions and 29 deletions
|
@ -5,18 +5,6 @@ describe DeleteCacheWorker do
|
|||
@test_ip = '10.0.0.1'
|
||||
end
|
||||
|
||||
it 'throws exception without 200 or 404 http status' do
|
||||
stub_request(:get, "http://#{@test_ip}/:cache/purge/test.jpg").
|
||||
with(headers: {'Host' => 'kyledrake.neocities.org'})
|
||||
.to_return(status: 503)
|
||||
|
||||
worker = DeleteCacheWorker.new
|
||||
|
||||
proc {
|
||||
worker.perform @test_ip, 'kyledrake', '/test.jpg'
|
||||
}.must_raise RestClient::ServiceUnavailable
|
||||
end
|
||||
|
||||
it 'handles 404 without exception' do
|
||||
stub_request(:get, "http://#{@test_ip}/:cache/purge/test.jpg").
|
||||
with(headers: {'Host' => 'kyledrake.neocities.org'})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue