parent
f0dcf44b9f
commit
717108d17f
1 changed files with 6 additions and 0 deletions
|
@ -38,6 +38,12 @@ describe('MessageView', function() {
|
|||
view.render();
|
||||
assert.match(view.$el.html(), /hour ago/);
|
||||
});
|
||||
it('should not imply messages are from the future', function() {
|
||||
var view = new Whisper.MessageView({model: message});
|
||||
message.set({'sent_at': Date.now() + 60000});
|
||||
view.render();
|
||||
assert.match(view.$el.html(), /seconds ago/);
|
||||
});
|
||||
|
||||
it('should go away when the model is destroyed', function() {
|
||||
var view = new Whisper.MessageView({model: message});
|
||||
|
|
Loading…
Reference in a new issue