forked from authts/oidc-client-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSignoutResponse.test.ts
More file actions
42 lines (31 loc) · 1.25 KB
/
Copy pathSignoutResponse.test.ts
File metadata and controls
42 lines (31 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
import { SignoutResponse } from "./SignoutResponse";
describe("SignoutResponse", () => {
describe("constructor", () => {
it("should read error", () => {
// act
const subject = new SignoutResponse(new URLSearchParams("error=foo"));
// assert
expect(subject.error).toEqual("foo");
});
it("should read error_description", () => {
// act
const subject = new SignoutResponse(new URLSearchParams("error_description=foo"));
// assert
expect(subject.error_description).toEqual("foo");
});
it("should read error_uri", () => {
// act
const subject = new SignoutResponse(new URLSearchParams("error_uri=foo"));
// assert
expect(subject.error_uri).toEqual("foo");
});
it("should read state", () => {
// act
const subject = new SignoutResponse(new URLSearchParams("state=foo"));
// assert
expect(subject.state).toEqual("foo");
});
});
});