1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-04 05:02:41 +03:00

User-Interactive auth for delete device

Allow app to pass in an auth dict on delete device
This commit is contained in:
Richard van der Hoff
2016-10-08 15:28:01 +01:00
parent e73051b230
commit d98867b810
2 changed files with 26 additions and 2 deletions

View File

@@ -383,6 +383,23 @@ describe("MatrixClient", function() {
httpBackend.flush();
});
});
describe("deleteDevice", function() {
var auth = {a: 1};
it("should pass through an auth dict", function(done) {
httpBackend.when(
"DELETE", "/_matrix/client/unstable/devices/my_device"
).check(function(req) {
expect(req.data).toEqual({auth: auth});
}).respond(200);
client.deleteDevice(
"my_device", auth
).catch(utils.failTest).done(done);
httpBackend.flush();
});
});
});
function assertObjectContains(obj, expected) {