Permalink
Browse files

Add tests for design ID

  • Loading branch information...
1 parent b201c46 commit 1dd4861df201b851f736561604e021f26550d92d @birtles birtles committed Mar 19, 2013
Showing with 10 additions and 2 deletions.
  1. +1 −1 wall/lib/walls.inc
  2. +9 −1 wall/tests/api/TestCreateWall.php
View
2 wall/lib/walls.inc
@@ -584,7 +584,7 @@ class Wall {
'editorUrl', 'editorShortUrl',
'duration', 'defaultDuration',
'ownerEmail', 'passcodeLen',
- 'latestSession');
+ 'designId', 'latestSession');
$result = array();
foreach ($keys as $localKey => $keyToExport) {
View
10 wall/tests/api/TestCreateWall.php
@@ -134,8 +134,16 @@ function testEmail() {
}
function testDesignId() {
- // Test it matches what we put in
+ $this->login();
+
+ // Test design ID matches what we put in
+ $wall = $this->_createWall('Test wall', $this->testDesignId);
+ $this->assertEqual(@$wall['designId'], $this->testDesignId);
+ $this->removeWall($wall['wallId']);
+
// Test a bad ID fails
+ $wall = $this->_createWall('Test wall', 5000);
+ $this->assertEqual(@$wall['error_key'], 'design-not-found');
}
function getWallPath($wallUrl) {

0 comments on commit 1dd4861

Please sign in to comment.