Permalink
Browse files

Switch get walls over to new walls code

  • Loading branch information...
birtles committed Mar 19, 2013
1 parent 54230cb commit d411994108891245fe4d7d8470c60625c2ec8f8a
Showing with 11 additions and 1 deletion.
  1. +5 −1 wall/public/api/doWalls.php
  2. +6 −0 wall/tests/api/TestGetWall.php
@@ -46,7 +46,11 @@
// XXX Return the list of walls here
bailWithError('bad-request');
}
- $result = getWallDetails($wallId, $_SESSION['email']);
+ $wall = Walls::getById($wallId, $email);
+ if ($wall === null)
+ bailWithError('not-found');
+
+ $result = $wall->asArray();
break;
default:
@@ -74,6 +74,12 @@ function testGetWall() {
$this->removeWall($wallId);
}
+ function testNotFound() {
+ $this->login();
+ $wall = $this->getWall(5000);
+ $this->assertEqual(@$wall['error_key'], 'not-found');
+ }
+
// XXX Check we can't get the information of someone else's wall
function looksLikeAUrl($url) {

0 comments on commit d411994

Please sign in to comment.