Skip to content

Commit 252d76b

Browse files
selfcontainedroboquat
authored andcommitted
fixing test
1 parent 7b8b3e0 commit 252d76b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

components/gitpod-db/src/auth-provider-entry.spec.db.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export class AuthProviderEntryDBSpec {
4141
id: "0049b9d2-005f-43c2-a0ae-76377805d8b8",
4242
host,
4343
ownerId,
44+
organizationId: null!,
4445
status: "verified",
4546
type: "GitHub",
4647
oauthRevision: undefined,
@@ -105,15 +106,17 @@ export class AuthProviderEntryDBSpec {
105106

106107
@test public async findByOrgId() {
107108
const ap1 = this.authProvider({ id: "1", organizationId: "O1" });
108-
const ap2 = this.authProvider({ id: "2", organizationId: "O2" });
109-
const ap3 = this.authProvider({ id: "3", organizationId: "O3" });
109+
const ap2 = this.authProvider({ id: "2", organizationId: "O1" });
110+
const ap3 = this.authProvider({ id: "3", organizationId: "O2" });
110111

111112
await this.db.storeAuthProvider(ap1, false);
112113
await this.db.storeAuthProvider(ap2, false);
113114
await this.db.storeAuthProvider(ap3, false);
114115

115-
const loadedAp = await this.db.findByOrgId("O1");
116-
expect(loadedAp.length).to.equal(2);
116+
const results = await this.db.findByOrgId("O1");
117+
expect(results.length).to.equal(2);
118+
expect(results).to.deep.contain(ap1);
119+
expect(results).to.deep.contain(ap2);
117120
}
118121
}
119122

0 commit comments

Comments
 (0)