Jelajahi Sumber

Arreglo put. Arreglo location migraciones

gabriel 6 tahun lalu
induk
melakukan
9d86497b06

+ 0 - 5
src/RadiusBundle/Controller/AccessRESTController.php

@@ -62,14 +62,9 @@ class AccessRESTController extends RESTController
             $repo = $em->getRepository($this->getRepository());
             $entities = $repo->matching($criteria)->toArray();
             if (count($entities) > 0 && $entities[0]) {
-                // modifico el location
-                $this->modifyLocation($request, $entities[0]);
                 // la entidad existe por lo tanto la actualizo
                 $resp = $this->putAction($request, $entities[0]);
             } else {
-                // inserto ellocation
-                $locationId = $this->addLocation($request);
-                $request->request->all()['location'] = $locationId;
                 // la entidad no existe, entonces la creo
                 $resp = $this->postAction($request);
             }

+ 1 - 1
src/RadiusBundle/tests/AccessRESTControllerTest.php

@@ -184,7 +184,7 @@ class AccessRESTControllerTest extends WebTestCaseBase
         // verifco el resultado
         $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
         $this->assertJson($response->getContent(), "No se obtuvo un objeto json.");
-        $this->assertContains('comments 2', strtolower($response->getContent()), "Error al buscar el access modificado.");
+        $this->assertContains('comments-2', strtolower($response->getContent()), "Error al buscar el access modificado.");
     }