diff --git a/restws.test b/restws.test index bc24072..06387a1 100644 --- a/restws.test +++ b/restws.test @@ -547,15 +547,17 @@ class RestWSTestCase extends DrupalWebTestCase { variable_set('menu_rebuild_needed', TRUE); // Verify that the query uri is working. - $this->drupalGet($menu_path . '.json'); + $result = $this->drupalGet($menu_path . '.json'); $this->assertResponse(200); - $this->assertEqual($node->title, $title, format_string("Resource query works correctly on custom menu path %path.", array('%path' => $menu_path))); + $result = drupal_json_decode($result); + $this->assertEqual($result['list'][0]['title'], $title); // Verify that the view uri is working. - $this->drupalGet($menu_path . '/1.json'); + $result = $this->drupalGet($menu_path . '/1.json'); $this->assertResponse(200); - $this->assertEqual($node->title, $title, format_string("Resource view works correctly on custom menu path %path.", array('%path' => $menu_path))); - } + $result = drupal_json_decode($result); + $this->assertEqual($result['title'], $title); + } } /**