|
@@ -41,6 +41,11 @@ class ONURESTControllerTest extends WebTestCaseBase
|
|
|
json_encode(array(array("name" => "Stock", "id" => 1)));
|
|
|
$datos['api/devices/check'] =
|
|
|
json_encode(array(array('result' => true, 'errors' => null)));
|
|
|
+ $datos['api/devices'] =
|
|
|
+ json_encode(array(array('name' => true, 'errors' => null)));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return $datos;
|
|
|
}
|
|
|
|
|
@@ -193,14 +198,15 @@ class ONURESTControllerTest extends WebTestCaseBase
|
|
|
|
|
|
$this->assertEquals("active", $json["administrativeState"]);
|
|
|
|
|
|
+ $this->initDefault($this->obtainDataWebService());
|
|
|
+
|
|
|
$this->getClient()->request('PATCH',
|
|
|
$this->getUriPutDelete(). "apply/". $json["id"] . "/administrative_state/active_to_suspend.json" , array());
|
|
|
$response = $this->getClient()->getResponse();
|
|
|
|
|
|
$json = json_decode($response->getContent(), true);
|
|
|
- $json = $json[0];
|
|
|
|
|
|
- $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
+ $this->assertEquals(201, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
$this->assertEquals("suspend", $json["administrativeState"]);
|
|
|
|
|
|
$response = $this->getClient()->getResponse();
|