mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: Remove useless stub tests
This commit is contained in:
parent
467485cf47
commit
4e80323567
1 changed files with 0 additions and 29 deletions
|
@ -414,35 +414,6 @@ test("staging and committing a post", function() {
|
|||
ok(postStream.get('lastAppended'), found, "comitting a post changes lastAppended");
|
||||
});
|
||||
|
||||
test('triggerNewPostInStream', function() {
|
||||
const postStream = buildStream(225566);
|
||||
const store = postStream.store;
|
||||
|
||||
sandbox.stub(postStream, 'appendMore').returns(new Ember.RSVP.resolve());
|
||||
sandbox.stub(postStream, "refresh").returns(new Ember.RSVP.resolve());
|
||||
|
||||
postStream.triggerNewPostInStream(null);
|
||||
ok(!postStream.appendMore.calledOnce, "asking for a null id does nothing");
|
||||
|
||||
postStream.toggleSummary();
|
||||
postStream.triggerNewPostInStream(1);
|
||||
ok(!postStream.appendMore.calledOnce, "it will not trigger when summary is active");
|
||||
|
||||
postStream.cancelFilter();
|
||||
postStream.toggleParticipant('eviltrout');
|
||||
postStream.triggerNewPostInStream(1);
|
||||
ok(!postStream.appendMore.calledOnce, "it will not trigger when a participant filter is active");
|
||||
|
||||
postStream.cancelFilter();
|
||||
postStream.triggerNewPostInStream(1);
|
||||
ok(!postStream.appendMore.calledOnce, "it wont't delegate to appendMore because the last post is not loaded");
|
||||
|
||||
postStream.cancelFilter();
|
||||
postStream.appendPost(store.createRecord('post', {id: 1, post_number: 2}));
|
||||
postStream.triggerNewPostInStream(2);
|
||||
ok(postStream.appendMore.calledOnce, "delegates to appendMore because the last post is loaded");
|
||||
});
|
||||
|
||||
test("loadedAllPosts when the id changes", function() {
|
||||
// This can happen in a race condition between staging a post and it coming through on the
|
||||
// message bus. If the id of a post changes we should reconsider the loadedAllPosts property.
|
||||
|
|
Loading…
Reference in a new issue