Merge pull request #587 from matrix-org/dbkr/fix_test_fail

Fix failing test
pull/21833/head
David Baker 2016-12-09 11:04:23 +00:00 committed by GitHub
commit 6a017ba763
1 changed files with 4 additions and 5 deletions

View File

@ -60,14 +60,13 @@ describe('RoomView', function () {
peg.get().getProfileInfo.returns(q({displayname: "foo"}));
var roomView = ReactDOM.render(<RoomView roomAddress="#alias:ser.ver" />, parentDiv);
peg.get().joinRoom = sinon.spy();
peg.get().joinRoom = function(x) {
expect(x).toEqual('#alias:ser.ver');
done();
};
process.nextTick(function() {
roomView.onJoinButtonClicked();
process.nextTick(function() {
expect(peg.get().joinRoom.calledWith('#alias:ser.ver')).toExist();
done();
});
});
});
});