1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-11 07:34:22 +02:00

feat(tests): update tests for Registry Endpoints #477

This commit is contained in:
Awilum
2020-11-22 19:05:02 +03:00
parent 04ed794fa5
commit ebf995ff41

View File

@@ -8,7 +8,7 @@ beforeEach(function() {
$this->client = new GuzzleHttp\Client();
});
test('test /api/registry', function () {
test('test GET /api/registry', function () {
$response = $this->client->request('GET', 'https://test.flextype.org/api/registry', [
'query' => [
'id' => 'flextype.manifest.version',
@@ -17,5 +17,5 @@ test('test /api/registry', function () {
]);
$this->assertEquals('flextype.manifest.version', json_decode((string) $response->getBody(), true)['data']['key']);
$this->assertEquals('0.9.11', json_decode((string) $response->getBody(), true)['data']['value']);
$this->assertTrue(version_compare(json_decode((string) $response->getBody(), true)['data']['value'], '0.0.0', '>=' ) >= 0);
});