File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,11 @@ test_expect_success "Add CARs for path traversal and DAG-PB representation tests
142142 test_should_contain $DAG_PB_CID import_output
143143'
144144
145+ test_expect_success " GET DAG-JSON with Accept: text/html returns HTML" '
146+ curl -sD - -H "Accept: text/html" "http://127.0.0.1:$GWAY_PORT/ipfs/$DAG_JSON_TRAVERSAL_CID" > curl_output 2>&1 &&
147+ test_should_contain "Content-Type: text/html" curl_output
148+ '
149+
145150test_expect_success " GET DAG-JSON traversal returns 400 if there is path remainder" '
146151 curl --head "http://127.0.0.1:$GWAY_PORT/ipfs/$DAG_JSON_TRAVERSAL_CID/foo?format=dag-json" > curl_output 2>&1 &&
147152 test_should_contain "400 Bad Request" curl_output
@@ -154,6 +159,11 @@ test_expect_success "GET DAG-JSON traverses multiple links" '
154159 test_cmp expected actual
155160'
156161
162+ test_expect_success " GET DAG-CBOR with Accept: text/html returns HTML" '
163+ curl -sD - -H "Accept: text/html" "http://127.0.0.1:$GWAY_PORT/ipfs/$DAG_CBOR_TRAVERSAL_CID" > curl_output 2>&1 &&
164+ test_should_contain "Content-Type: text/html" curl_output
165+ '
166+
157167test_expect_success " GET DAG-CBOR traversal returns 400 if there is path remainder" '
158168 curl --head "http://127.0.0.1:$GWAY_PORT/ipfs/$DAG_CBOR_TRAVERSAL_CID/foo?format=dag-cbor" > curl_output 2>&1 &&
159169 test_should_contain "400 Bad Request" curl_output
You can’t perform that action at this time.
0 commit comments