Skip to content

Commit

Permalink
extend query calls tests
Browse files Browse the repository at this point in the history
  • Loading branch information
szuperaz committed Nov 8, 2023
1 parent 41c6338 commit a77641e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
10 changes: 10 additions & 0 deletions __tests__/call-members.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ describe("call members API", () => {
expect(response.members[2].role).toBe("user");
});

it("query calls - filter by call members", async () => {
const response = await client.video.queryCalls({
filter_conditions: {
members: { $in: ["sara"] },
},
});

expect(response.calls.length).toBeGreaterThanOrEqual(1);
});

it("block and unblock users", async () => {
const response = await call.blockUser({ user_id: "sara" });

Expand Down
18 changes: 18 additions & 0 deletions __tests__/call.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,24 @@ describe("call API", () => {
expect(response.calls.length).toBeGreaterThanOrEqual(1);
});

it("query calls - ongoing", async () => {
const response = await client.video.queryCalls({
filter_conditions: { ongoing: { $eq: true } },
});

// Dummy test
expect(response.calls).toBeDefined();
});

it("query calls - upcoming", async () => {
const response = await client.video.queryCalls({
filter_conditions: { starts_at: { $gt: new Date().toISOString() } },
});

// Dummy test
expect(response.calls).toBeDefined();
});

describe("recording", () => {
it("enable call recording", async () => {
let response = await call.update({
Expand Down

0 comments on commit a77641e

Please sign in to comment.