Skip to content

Commit

Permalink
adding test for findTeams by slug
Browse files Browse the repository at this point in the history
  • Loading branch information
selfcontained committed Dec 19, 2022
1 parent e7d6b90 commit 12bf873
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/gitpod-db/src/team-db.spec.db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

0 comments on commit 12bf873

Please sign in to comment.