summaryrefslogtreecommitdiff
path: root/tests/BookmarkTest.php
diff options
context:
space:
mode:
authorbretticvs <bsdee@frii.com>2011-03-15 07:53:39 +0100
committerChristian Weiske <cweiske@cweiske.de>2011-03-15 07:53:39 +0100
commit65bd4bfab86fc47be3ce125640ebd49163f24f4b (patch)
tree7f1c5464bfee6204f19d361bd1425d0328e9e1c9 /tests/BookmarkTest.php
parent4cc46f268676d8df88ce6003df2a7bc9249fe7fb (diff)
downloadsemanticscuttle-65bd4bfab86fc47be3ce125640ebd49163f24f4b.tar.gz
semanticscuttle-65bd4bfab86fc47be3ce125640ebd49163f24f4b.tar.bz2
Updates for feature request 3164348: Make default privacy configurable.
Diffstat (limited to 'tests/BookmarkTest.php')
-rw-r--r--tests/BookmarkTest.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/BookmarkTest.php b/tests/BookmarkTest.php
index f54fe9a..aa0b8c3 100644
--- a/tests/BookmarkTest.php
+++ b/tests/BookmarkTest.php
@@ -1343,6 +1343,30 @@ class BookmarkTest extends TestBase
}
+ /**
+ * Test that the default privacy setting in
+ * $GLOBALS['defaults']['privacy'] is used
+ * as expected.
+ *
+ * @return void
+ */
+ public function testDefaultPrivacy()
+ {
+ $GLOBALS['defaults']['privacy'] = 1;
+ $uid = $this->addUser();
+ $this->us->setCurrentUserId($uid);
+ $bid = $this->bs->addBookmark('http://www.somedomain.com', 'mybookmark1', 'descr1', 'privatenote1', $GLOBALS['defaults']['privacy'], array());
+ $bm = $this->bs->getBookmark($bid);
+ $this->assertEquals('1', $bm['bStatus']);
+ $GLOBALS['defaults']['privacy'] = 2;
+ $uid = $this->addUser();
+ $this->us->setCurrentUserId($uid);
+ $bid = $this->bs->addBookmark('http://www.anotherdomain.com', 'mybookmark2', 'descr2', 'privatenote2', $GLOBALS['defaults']['privacy'], array());
+ $bm = $this->bs->getBookmark($bid);
+ $this->assertEquals('2', $bm['bStatus']);
+ }//end function testDefaultPrivacy
+
+
}