This commit is contained in:
Bruno Windels 2020-09-23 18:20:29 +02:00
parent 6e77ebb160
commit 64f657e5a2

View File

@ -291,10 +291,12 @@ export class RoomSummary {
export function tests() {
return {
"membership trigger change": function(assert) {
"membership trigger change": async function(assert) {
const summary = new RoomSummary("id");
let written = false;
const changes = summary.writeSync({}, "join", false, false, {roomSummary: {set: () => { written = true; }}});
let changes = summary.data.applySyncResponse({}, "join");
const txn = {roomSummary: {set: () => { written = true; }}};
changes = summary.writeData(changes, txn);
assert(changes);
assert(written);
assert.equal(changes.membership, "join");