summaryrefslogtreecommitdiff
path: root/tests/client-manifest-fraudulent.scm
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-09-22 13:11:21 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-09-22 18:08:47 +0200
commit555e59deba33284067298ce6130c379c75e3d2a3 (patch)
treec15c823913e917bc474f1cf163caf65a117ee9c3 /tests/client-manifest-fraudulent.scm
parent0d74f8c1ca9c1e9bf9a04b85f598ba7a175d1d86 (diff)
Use anonymous-http-request from (webid-oidc parameters) everywhere
Diffstat (limited to 'tests/client-manifest-fraudulent.scm')
-rw-r--r--tests/client-manifest-fraudulent.scm29
1 files changed, 15 insertions, 14 deletions
diff --git a/tests/client-manifest-fraudulent.scm b/tests/client-manifest-fraudulent.scm
index a1bfe20..548f6c1 100644
--- a/tests/client-manifest-fraudulent.scm
+++ b/tests/client-manifest-fraudulent.scm
@@ -17,6 +17,7 @@
(use-modules (webid-oidc client-manifest)
(webid-oidc cache)
(webid-oidc testing)
+ ((webid-oidc parameters) #:prefix p:)
(webid-oidc errors)
(web uri)
(srfi srfi-19)
@@ -58,17 +59,17 @@
(unless (equal? headers headers-to-expect)
(exit 2))
(values what-to-respond what-to-respond-body))
- (define cache-http-get
- (with-cache
- #:http-get respond))
- (with-exception-handler
- (lambda (error)
- (unless (inconsistent-client-manifest? error)
- (exit 3)))
- (lambda ()
- (get-client-manifest
- (string->uri "https://fraudulent-app.example.com/id#app")
- #:http-get cache-http-get)
- (exit 4))
- #:unwind? #t
- #:unwind-for-type &inconsistent-client-manifest)))
+ (parameterize ((p:anonymous-http-request respond))
+ (use-cache
+ (lambda ()
+ (with-exception-handler
+ (lambda (error)
+ (unless (inconsistent-client-manifest? error)
+ (exit 3)))
+ (lambda ()
+ (parameterize ((p:current-date 0))
+ (get-client-manifest
+ (string->uri "https://fraudulent-app.example.com/id#app")))
+ (exit 4))
+ #:unwind? #t
+ #:unwind-for-type &inconsistent-client-manifest))))))