correct specs
This commit is contained in:
parent
de107a60c2
commit
db7a225df7
|
@ -320,7 +320,7 @@ test("staging and undoing a new post", function() {
|
|||
|
||||
// Stage the new post in the stream
|
||||
var result = postStream.stagePost(stagedPost, user);
|
||||
equal(result, true, "it returns true");
|
||||
equal(result, "staged", "it returns staged");
|
||||
equal(topic.get('highest_post_number'), 2, "it updates the highest_post_number");
|
||||
ok(postStream.get('loading'), "it is loading while the post is being staged");
|
||||
|
||||
|
@ -355,13 +355,13 @@ test("staging and committing a post", function() {
|
|||
|
||||
// Stage the new post in the stream
|
||||
var result = postStream.stagePost(stagedPost, user);
|
||||
equal(result, true, "it returns true");
|
||||
equal(result, "staged", "it returns staged");
|
||||
|
||||
ok(postStream.get('loading'), "it is loading while the post is being staged");
|
||||
stagedPost.setProperties({ id: 1234, raw: "different raw value" });
|
||||
|
||||
result = postStream.stagePost(stagedPost, user);
|
||||
equal(result, false, "you can't stage a post while it is currently staging");
|
||||
equal(result, "alreadyStaging", "you can't stage a post while it is currently staging");
|
||||
|
||||
postStream.commitPost(stagedPost);
|
||||
ok(postStream.get('posts').contains(stagedPost), "the post is still in the stream");
|
||||
|
|
Loading…
Reference in New Issue