Improved AuthenticationMiddleware API tests

This commit is contained in:
Alejandro Celaya
2019-11-26 21:29:25 +01:00
parent 13e795d25d
commit 509c9fe2e8
10 changed files with 57 additions and 33 deletions

View File

@@ -5,7 +5,6 @@ declare(strict_types=1);
namespace ShlinkioApiTest\Shlink\Rest\Action;
use GuzzleHttp\RequestOptions;
use Shlinkio\Shlink\Rest\Util\RestUtils;
use Shlinkio\Shlink\TestUtils\ApiTest\ApiTestCase;
class EditShortUrlActionTest extends ApiTestCase
@@ -17,7 +16,7 @@ class EditShortUrlActionTest extends ApiTestCase
['error' => $error] = $this->getJsonResponsePayload($resp);
$this->assertEquals(self::STATUS_NOT_FOUND, $resp->getStatusCode());
$this->assertEquals(RestUtils::INVALID_SHORTCODE_ERROR, $error);
$this->assertEquals('INVALID_SHORTCODE', $error);
}
/** @test */
@@ -29,6 +28,6 @@ class EditShortUrlActionTest extends ApiTestCase
['error' => $error] = $this->getJsonResponsePayload($resp);
$this->assertEquals(self::STATUS_BAD_REQUEST, $resp->getStatusCode());
$this->assertEquals(RestUtils::INVALID_ARGUMENT_ERROR, $error);
$this->assertEquals('INVALID_ARGUMENT', $error);
}
}