Thanks - Pharo 2.0 and Zinc makes it really easy
to work with, write AND test HTTP stuff:

------------------------------------------------------------------------------------------------------------------
testHandleRequestForFavIcon

        | response mime |
        response := requestHandler handleRequest: (ZnRequest get: 
'/favicon.ico' asZnUrl).
        self assert: response status = 200. "HTTP OK"
        
        mime := response entity contentType.
        self assert: mime main= 'image';
             assert: mime sub = 'vnd.microsoft.icon'

------------------------------------------------------------------------------------------------------------------

testSearchEngineIsSatisfied

        self assert: (ZnEasy get: 'http://www.pharo.org/robots.txt') status = 
200

------------------------------------------------------------------------------------------------------------------
...

Reply via email to