summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-07-27 10:59:45 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-07-27 13:40:09 +0200
commite150c1b232294d9352b61df22e82e2d4513b615e (patch)
tree22ab5b13caed5c5ec942fde2e13c475e19b97e9b /tests
parent4d9a10165a6c7bf8df6f86f032bf7b3412e83ae6 (diff)
Support for json-ld
Diffstat (limited to 'tests')
-rw-r--r--tests/client-manifest-fraudulent.scm2
-rw-r--r--tests/client-manifest.scm2
-rw-r--r--tests/crud.scm6
-rw-r--r--tests/provider-confirmation.scm2
4 files changed, 6 insertions, 6 deletions
diff --git a/tests/client-manifest-fraudulent.scm b/tests/client-manifest-fraudulent.scm
index 96cabf4..a43039d 100644
--- a/tests/client-manifest-fraudulent.scm
+++ b/tests/client-manifest-fraudulent.scm
@@ -53,7 +53,7 @@
}\"\"\" .
")
(define headers-to-expect
- '((accept (text/turtle))))
+ '((accept (text/turtle application/n-quads application/ld+json))))
(define uri-to-expect
(string->uri "https://fraudulent-app.example.com/id#app"))
(define* (respond uri #:key (headers '()))
diff --git a/tests/client-manifest.scm b/tests/client-manifest.scm
index 12453ce..ba8a79a 100644
--- a/tests/client-manifest.scm
+++ b/tests/client-manifest.scm
@@ -47,7 +47,7 @@
}\"\"\" .
")
(define* (respond uri #:key (headers '()))
- (unless (equal? headers '((accept (text/turtle))))
+ (unless (equal? headers '((accept (text/turtle application/n-quads application/ld+json))))
(exit 1))
(when (string? uri)
(set! uri (string->uri uri)))
diff --git a/tests/crud.scm b/tests/crud.scm
index 6f5a3c0..17a0ac4 100644
--- a/tests/crud.scm
+++ b/tests/crud.scm
@@ -118,7 +118,7 @@
;; For root, we’re looking for the following headers:
;; - link: ldp:BasicContainer; rel = "type", </.acl>; rel = "acl", pim:Storage; rel = "type", owner; rel = "solid:owner"
;; - allow: GET, HEAD, OPTIONS, PUT, POST, but not DELETE
- ;; - accept-put: 'text/turtle
+ ;; - accept-put: 'text/turtle 'application/n-quads 'application/ld+json
;; - content-type: 'text/turtle
;; - etag: weak
;; The content is a RDF graph, it should contain 1 triple: </> ldp:contains </inbox>.
@@ -149,7 +149,7 @@
(exit 10))
(when (memq 'DELETE allow)
(exit 11))
- (unless (equal? accept-put "text/turtle")
+ (unless (equal? accept-put "text/turtle; application/n-quads; application/ld+json")
(exit 12))
(unless (equal? content-type '(text/turtle))
(exit 13))
@@ -190,7 +190,7 @@
(exit 17))
(when (memq 'POST allow)
(exit 18))
- (unless (equal? accept-put "text/turtle")
+ (unless (equal? accept-put "text/turtle; application/n-quads; application/ld+json")
(exit 19))
(unless (equal? content-type '(text/turtle))
(exit 20))
diff --git a/tests/provider-confirmation.scm b/tests/provider-confirmation.scm
index 4a240e2..fe9f4a2 100644
--- a/tests/provider-confirmation.scm
+++ b/tests/provider-confirmation.scm
@@ -28,7 +28,7 @@
(define what-uri-to-expect
(string->uri "https://provider-confirmation.scm/id#webid"))
(define what-headers-to-expect
- '((accept (text/turtle))))
+ '((accept (text/turtle application/n-quads application/ld+json))))
(define what-to-respond
(build-response #:headers '((content-type text/turtle))))
(define what-to-respond-body