diff options
author | Christian Weiske | 2011-03-28 08:34:12 +0200 |
---|---|---|
committer | Christian Weiske | 2011-03-28 08:34:12 +0200 |
commit | a5bd7789297378be3fb8dc3814c6649ea82a88d8 (patch) | |
tree | 1aa8aaed712641d5af822c90fb57aa7a0aa8d9e4 /tests/ajax/GetAdminLinkedTagsTest.php | |
parent | 1dfff5d3d81fdb67e4c78136168801a488fcf139 (diff) | |
download | scuttle-a5bd7789297378be3fb8dc3814c6649ea82a88d8.tar.gz scuttle-a5bd7789297378be3fb8dc3814c6649ea82a88d8.zip |
introduce assertResponseJson200 for API/ajax tests and use it
Diffstat (limited to 'tests/ajax/GetAdminLinkedTagsTest.php')
-rw-r--r-- | tests/ajax/GetAdminLinkedTagsTest.php | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/tests/ajax/GetAdminLinkedTagsTest.php b/tests/ajax/GetAdminLinkedTagsTest.php index 2552ea0..aded834 100644 --- a/tests/ajax/GetAdminLinkedTagsTest.php +++ b/tests/ajax/GetAdminLinkedTagsTest.php @@ -58,13 +58,7 @@ class ajax_GetAdminLinkedTagsTest extends TestBaseApi { $req = $this->getRequest(); $res = $req->send(); - - $this->assertEquals(200, $res->getStatus()); - $this->assertEquals( - 'application/json; charset=utf-8', - $res->getHeader('content-type') - ); - + $this->assertResponseJson200($res); $data = json_decode($res->getBody()); $this->assertInternalType('array', $data); @@ -99,11 +93,7 @@ class ajax_GetAdminLinkedTagsTest extends TestBaseApi ); $res = $this->getRequest('?tag=' . $menu2Tag)->send(); - $this->assertEquals(200, $res->getStatus()); - $this->assertEquals( - 'application/json; charset=utf-8', - $res->getHeader('content-type') - ); + $this->assertResponseJson200($res); $data = json_decode($res->getBody()); $this->assertInternalType('array', $data); @@ -139,11 +129,7 @@ class ajax_GetAdminLinkedTagsTest extends TestBaseApi ); $res = $this->getRequest('?tag=' . $menu2Tag)->send(); - $this->assertEquals(200, $res->getStatus()); - $this->assertEquals( - 'application/json; charset=utf-8', - $res->getHeader('content-type') - ); + $this->assertResponseJson200($res); $data = json_decode($res->getBody()); $this->assertInternalType('array', $data); |