diff --git a/components/gitpod-db/src/team-db.spec.db.ts b/components/gitpod-db/src/team-db.spec.db.ts index 5a5af331dd1a0f..a5cd421a87f63c 100644 --- a/components/gitpod-db/src/team-db.spec.db.ts +++ b/components/gitpod-db/src/team-db.spec.db.ts @@ -151,6 +151,17 @@ class TeamDBSpec { const result = await this.db.findTeams(0, 10, "creationTime", "DESC", searchTerm); expect(result.rows.length).to.eq(1); } + + @test(timeout(10000)) + public async findTeamsBySlug() { + const user = await this.userDb.newUser(); + await this.db.createTeam(user.id, "First Team"); + await this.db.createTeam(user.id, "Second Team"); + + const searchTerm = "first-team"; + const result = await this.db.findTeams(0, 10, "creationTime", "DESC", searchTerm); + expect(result.rows.length).to.eq(1); + } } module.exports = new TeamDBSpec();