Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Nov 23, 2023
1 parent 65b1816 commit 379c4b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/MatrixClientTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2767,7 +2767,7 @@ describe('MatrixClient', () => {
const eventId = "$def456:example.org";
const originServerTs = 4567;

http.when("GET", "/_matrix/client/v3/rooms").respond(200, (path, _content, req) => {
http.when("GET", "/_matrix/client/v1/rooms").respond(200, (path, _content, req) => {
expect(path).toEqual(`${hsUrl}/_matrix/client/v1/rooms/${encodeURIComponent(roomId)}/timestamp_to_event`);
expect(req.queryParams['dir']).toEqual(dir);
expect(req.queryParams['ts']).toEqual(timestamp);
Expand All @@ -2781,7 +2781,7 @@ describe('MatrixClient', () => {
const [result] = await Promise.all([client.getEventNearestToTimestamp(roomId, timestamp, dir), http.flushAllExpected()]);
expect(result).toBeDefined();
expect(result.event_id).toEqual(eventId);
expect(result.origin_server_ts).toMatchObject(originServerTs);
expect(result.origin_server_ts).toEqual(originServerTs);
});
});

Expand Down
4 changes: 2 additions & 2 deletions test/SynapseAdminApisTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ describe('SynapseAdminApis', () => {
http.when("GET", "/_synapse/admin/v1/rooms").respond(200, (path, _content, req) => {
expect(path).toEqual(`${hsUrl}/_synapse/admin/v1/rooms/${encodeURIComponent(roomId)}/timestamp_to_event`);
expect(req.queryParams['dir']).toEqual(dir);
expect(req.queryParams['ts']).toEqual(timestamp.toString());
expect(req.queryParams['ts']).toEqual(timestamp);

return {
event_id: eventId,
Expand All @@ -556,7 +556,7 @@ describe('SynapseAdminApis', () => {
const [result] = await Promise.all([client.getEventNearestToTimestamp(roomId, timestamp, dir), http.flushAllExpected()]);
expect(result).toBeDefined();
expect(result.event_id).toEqual(eventId);
expect(result.origin_server_ts).toMatchObject(originServerTs);
expect(result.origin_server_ts).toEqual(originServerTs);
});
});
});
Expand Down

0 comments on commit 379c4b1

Please sign in to comment.