commit
6a017ba763
|
@ -60,14 +60,13 @@ describe('RoomView', function () {
|
||||||
peg.get().getProfileInfo.returns(q({displayname: "foo"}));
|
peg.get().getProfileInfo.returns(q({displayname: "foo"}));
|
||||||
var roomView = ReactDOM.render(<RoomView roomAddress="#alias:ser.ver" />, parentDiv);
|
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() {
|
process.nextTick(function() {
|
||||||
roomView.onJoinButtonClicked();
|
roomView.onJoinButtonClicked();
|
||||||
process.nextTick(function() {
|
|
||||||
expect(peg.get().joinRoom.calledWith('#alias:ser.ver')).toExist();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue