1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-23 01:24:30 +02:00
ferret/e2e/tests/static/doc/headers/set.fql

20 lines
493 B
Plaintext
Raw Normal View History

LET url = @static + "/api/ts"
LET page = DOCUMENT(url, {
driver: "http",
headers: {
"Access-Control-Allow-Origin": "*",
"X-Request-Id": "foobar"
}
})
LET el = ELEMENT(page, "#headers")
LET actual = JSON_PARSE(el.innerText)
LET expected = {
"Access-Control-Allow-Origin": ["*"],
"X-Request-Id": ["foobar"]
}
RETURN EXPECT(expected, {
"Access-Control-Allow-Origin": actual["Access-Control-Allow-Origin"],
"X-Request-Id": actual["X-Request-Id"]
})