summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-28 22:13:57 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-28 22:13:57 +0000
commit03bc498effbd7d009cbfa15f765a8d4934e52ea1 (patch)
treef742031855edfa1039b5b7f4b18efcf11a0a8cc1
parent64a44cceb80e29d14c718c576c1db02ca38b2195 (diff)
downloadsemanticscuttle-03bc498effbd7d009cbfa15f765a8d4934e52ea1.tar.gz
semanticscuttle-03bc498effbd7d009cbfa15f765a8d4934e52ea1.tar.bz2
test that voting for other bookmarks does not change when voting for one bookmark
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@447 b3834d28-1941-0410-a4f8-b48e95affb8f
-rw-r--r--tests/VoteTest.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/VoteTest.php b/tests/VoteTest.php
index 326a5b9..2579709 100644
--- a/tests/VoteTest.php
+++ b/tests/VoteTest.php
@@ -57,6 +57,8 @@ class VoteTest extends TestBase
//FIXME: create true new instance
$this->vs = SemanticScuttle_Service_Factory::get('Vote');
$this->vs->deleteAll();
+
+ $this->bs = SemanticScuttle_Service_Factory::get('Bookmark');
}
@@ -193,7 +195,9 @@ class VoteTest extends TestBase
/**
- * Test hasVoted() when a vote has been cast for other bookmarks
+ * Test hasVoted() when a vote has been cast for other bookmarks.
+ * Also verify that the bookmark voting did not change for
+ * the other bookmarks.
*
* @return void
*/
@@ -208,6 +212,9 @@ class VoteTest extends TestBase
$this->vs->vote($bid3, $uid, 1);
$this->assertFalse($this->vs->hasVoted($bid2, $uid));
+
+ $bm2 = $this->bs->getBookmark($bid2);
+ $this->assertEquals(0, $bm2['bVoting']);
}