Skip to content

Commit

Permalink
Adding test for togle likes
Browse files Browse the repository at this point in the history
  • Loading branch information
satanasov committed Aug 18, 2014
1 parent 0ba1bd3 commit 76c14eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/functional/postlove_post_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public function test_post()
$this->assertContains('0 x', $crawler->filter('#p' . $post2['post_id'])->filter('#postlove')->text());

//togle like
//$crw1 = self::request('GET', 'app.php/postlove/togle/' . $post2['post_id'], array(), array(), array('CONTENT_TYPE' => 'application/json'));
$crw1 = self::request('GET', 'app.php/postlove/togle/' . $post2['post_id'], array(), array(), array('CONTENT_TYPE' => 'application/json'));

//reload page and test ...
$crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
$this->assertContains('0 x', $crawler->filter('#p' . $post2['post_id'])->filter('#postlove')->text());
$this->assertContains('1 x', $crawler->filter('#p' . $post2['post_id'])->filter('#postlove')->text());
}
}

0 comments on commit 76c14eb

Please sign in to comment.