Skip to content

Commit 6ec3074

Browse files
committed
updated store test
1 parent f233a12 commit 6ec3074

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/stores/LocalAuthStore.spec.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,22 +128,26 @@ describe("LocalAuthStore", function () {
128128
store.save(
129129
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2xsZWN0aW9uSWQiOiJwYmNfMTIzIiwiZXhwIjoxNzMyOTY4MDA1LCJpZCI6IktUNDViek5BMzQwWGE3TCIsInJlZnJlc2hhYmxlIjp0cnVlLCJ0eXBlIjoiYXV0aCJ9.mxHqwy4zaukvc9HRhKB_LA84UelQjo37rhTAykryV80",
130130
);
131-
132131
assert.isFalse(store.isSuperuser, "non-superuser token");
133132

134133
// superuser token
135134
store.save(
136135
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2xsZWN0aW9uSWQiOiJwYmNfMzE0MjYzNTgyMyIsImV4cCI6MTczMjk2ODAwNSwiaWQiOiJLVDQ1YnpOQTM0MFhhN0wiLCJyZWZyZXNoYWJsZSI6dHJ1ZSwidHlwZSI6ImF1dGgifQ.k73nw7y3RFBm-_S0RcmJrGQ_imJPgbUZk6VT0kW0igc",
137136
);
138-
139137
assert.isTrue(store.isSuperuser, "superuser token");
140138

139+
// non-superuser record
140+
store.save(
141+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2xsZWN0aW9uSWQiOiJwYmNfMTIzIiwiZXhwIjoxNzMyOTY4MDA1LCJpZCI6IktUNDViek5BMzQwWGE3TCIsInJlZnJlc2hhYmxlIjp0cnVlLCJ0eXBlIjoiYXV0aCJ9.mxHqwy4zaukvc9HRhKB_LA84UelQjo37rhTAykryV80",
142+
{id: "abc", collectionId: "abc", collectionName: "abc"},
143+
);
144+
assert.isFalse(store.isSuperuser, "non-superuser record");
145+
141146
// superuser record
142147
store.save(
143148
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2xsZWN0aW9uSWQiOiJwYmNfMTIzIiwiZXhwIjoxNzMyOTY4MDA1LCJpZCI6IktUNDViek5BMzQwWGE3TCIsInJlZnJlc2hhYmxlIjp0cnVlLCJ0eXBlIjoiYXV0aCJ9.mxHqwy4zaukvc9HRhKB_LA84UelQjo37rhTAykryV80",
144149
{id: "abc", collectionId: "abc", collectionName: "_superusers"},
145150
);
146-
147151
assert.isTrue(store.isSuperuser, "superuser record");
148152
});
149153
});

0 commit comments

Comments
 (0)