]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
test that voting for other bookmarks does not change when voting for one bookmark
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Wed, 28 Oct 2009 22:13:57 +0000 (22:13 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Wed, 28 Oct 2009 22:13:57 +0000 (22:13 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@447 b3834d28-1941-0410-a4f8-b48e95affb8f

tests/VoteTest.php

index 326a5b96b3e01bd977b92bbc8082fcbb6115cc6b..2579709b9105ca7617391ad7fe1effd67181cb6f 100644 (file)
@@ -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']);
     }