Skip to content

Commit 2159c6a

Browse files
committed
ref #178 -- wrote test to cover published posts
1 parent 8c618a3 commit 2159c6a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test-stream-manager-integration.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,15 @@ function testBasicStream() {
1717
$this->assertEquals($count, count($posts));
1818
}
1919

20+
function testPostPublish() {
21+
$stream = $this->buildStream();
22+
$this->buildPosts(4);
23+
$posts = $stream->get_posts();
24+
$this->assertEquals(4, count($posts));
25+
$post_id = $this->factory->post->create(array('post_status' => 'draft'));
26+
wp_publish_post($post_id);
27+
$posts = $stream->get_posts(array('post_type' => 'post'));
28+
$this->assertEquals(5, count($posts));
29+
}
30+
2031
}

0 commit comments

Comments
 (0)