diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-09-28 22:14:31 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-09-28 22:14:31 +0000 |
commit | 22c9a01ee845d2b92fcab6b6cb10ac6ff0eec52e (patch) | |
tree | 5f5c876689ee1dc4d8054db29ce9946221b0045b /tests/Api/PostsDeleteTest.php | |
parent | df8216d607a9806b57b83eea9eb55577eae7d54f (diff) | |
download | semanticscuttle-22c9a01ee845d2b92fcab6b6cb10ac6ff0eec52e.tar.gz semanticscuttle-22c9a01ee845d2b92fcab6b6cb10ac6ff0eec52e.tar.bz2 |
rewrite api/posts/delete to be more secure and add unit tests for it
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@769 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'tests/Api/PostsDeleteTest.php')
-rw-r--r-- | tests/Api/PostsDeleteTest.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/Api/PostsDeleteTest.php b/tests/Api/PostsDeleteTest.php index 705f94e..626746f 100644 --- a/tests/Api/PostsDeleteTest.php +++ b/tests/Api/PostsDeleteTest.php @@ -202,8 +202,9 @@ class Api_PostsDeleteTest extends TestBaseApi //send request $res = $req->send(); - //401 - unauthorized - $this->assertEquals(401, $res->getStatus()); + //404 - user does not have that bookmark + $this->assertEquals(404, $res->getStatus()); + //verify MIME content type $this->assertEquals( 'text/xml; charset=utf-8', @@ -211,10 +212,10 @@ class Api_PostsDeleteTest extends TestBaseApi ); //verify xml - $this->assertNotTag( + $this->assertTag( array( 'tag' => 'result', - 'attributes' => array('code' => 'done') + 'attributes' => array('code' => 'something went wrong') ), $res->getBody(), '', false |