forked from cadence/breezewiki
fmt
This commit is contained in:
parent
bab6c56205
commit
96af163773
1 changed files with 11 additions and 4 deletions
|
@ -44,11 +44,18 @@
|
||||||
(module+ test
|
(module+ test
|
||||||
(require rackunit)
|
(require rackunit)
|
||||||
(parameterize ([(config-parameter 'strict_proxy) "true"])
|
(parameterize ([(config-parameter 'strict_proxy) "true"])
|
||||||
(check-equal? (get-media-html "https://static.wikia.nocookie.net/a" "image/jpeg") `(img (@ (src "/proxy?dest=https%3A%2F%2Fstatic.wikia.nocookie.net%2Fa"))))
|
(check-equal? (get-media-html "https://static.wikia.nocookie.net/a" "image/jpeg")
|
||||||
(check-equal? (get-media-html "https://static.wikia.nocookie.net/b" "audio/mp3") `(audio (@ (src "/proxy?dest=https%3A%2F%2Fstatic.wikia.nocookie.net%2Fb") (controls)))))
|
`(img (@ (src "/proxy?dest=https%3A%2F%2Fstatic.wikia.nocookie.net%2Fa"))))
|
||||||
|
(check-equal? (get-media-html "https://static.wikia.nocookie.net/b" "audio/mp3")
|
||||||
|
`(audio (@ (src "/proxy?dest=https%3A%2F%2Fstatic.wikia.nocookie.net%2Fb")
|
||||||
|
(controls)))))
|
||||||
(parameterize ([(config-parameter 'strict_proxy) "no"])
|
(parameterize ([(config-parameter 'strict_proxy) "no"])
|
||||||
(check-equal? (get-media-html "https://static.wikia.nocookie.net/c" "application/ogg") `(audio (@ (src "/proxy?dest=https%3A%2F%2Fstatic.wikia.nocookie.net%2Fc") (controls))))
|
(check-equal? (get-media-html "https://static.wikia.nocookie.net/c" "application/ogg")
|
||||||
(check-equal? (get-media-html "https://static.wikia.nocookie.net/d" "video/mp4") `(video (@ (src "/proxy?dest=https%3A%2F%2Fstatic.wikia.nocookie.net%2Fd") (controls)))))
|
`(audio (@ (src "/proxy?dest=https%3A%2F%2Fstatic.wikia.nocookie.net%2Fc")
|
||||||
|
(controls))))
|
||||||
|
(check-equal? (get-media-html "https://static.wikia.nocookie.net/d" "video/mp4")
|
||||||
|
`(video (@ (src "/proxy?dest=https%3A%2F%2Fstatic.wikia.nocookie.net%2Fd")
|
||||||
|
(controls)))))
|
||||||
(check-equal? (get-media-html "https://example.com" "who knows") `"")
|
(check-equal? (get-media-html "https://example.com" "who knows") `"")
|
||||||
(check-equal? (get-media-html "https://example.com" #f) `""))
|
(check-equal? (get-media-html "https://example.com" #f) `""))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue