summaryrefslogtreecommitdiff
path: root/packages/integrations/deno/test/basics.test.ts
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2022-10-12 08:31:55 -0400
committerGravatar GitHub <noreply@github.com> 2022-10-12 08:31:55 -0400
commit1e27992437aa0371b8550acb3e3f79e62721a506 (patch)
tree884fb5500c70446904569383c6a2d1708784f76a /packages/integrations/deno/test/basics.test.ts
parentbaf88ee9e5e692a94981d7a696fbdcb4cd8ab2a6 (diff)
downloadastro-1e27992437aa0371b8550acb3e3f79e62721a506.tar.gz
astro-1e27992437aa0371b8550acb3e3f79e62721a506.tar.zst
astro-1e27992437aa0371b8550acb3e3f79e62721a506.zip
Update the Astro.cookies.set types to receive boolean and numbers (#5047)
Diffstat (limited to '')
-rw-r--r--packages/integrations/deno/test/basics.test.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/integrations/deno/test/basics.test.ts b/packages/integrations/deno/test/basics.test.ts
index 9c55397c2..d1f8907cb 100644
--- a/packages/integrations/deno/test/basics.test.ts
+++ b/packages/integrations/deno/test/basics.test.ts
@@ -126,3 +126,20 @@ Deno.test({
sanitizeResources: false,
sanitizeOps: false,
});
+
+Deno.test({
+ name: 'Astro.cookies',
+ permissions: defaultTestPermissions,
+ async fn() {
+ await startApp(async (baseUrl: URL) => {
+ const url = new URL('/admin', baseUrl);
+ const resp = await fetch(url, { redirect: 'manual' });
+ assertEquals(resp.status, 302);
+
+ const headers = resp.headers;
+ assertEquals(headers.get('set-cookie'), 'logged-in=false; Max-Age=77760000; Path=/');
+ });
+ },
+ sanitizeResources: false,
+ sanitizeOps: false,
+});