Skip to content

Commit

Permalink
Implement changes from #161, closes it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Syndesi committed Oct 6, 2023
1 parent a622961 commit 5cf4cba
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ ELASTIC_AUTH=ember-nexus-elasticsearch:9200
REDIS_AUTH=tcp://ember-nexus-redis?password=redis-password
RABBITMQ_AUTH=amqp://user:password@ember-nexus-rabbitmq:5672

REFERENCE_DATASET_VERSION=0.0.12
REFERENCE_DATASET_VERSION=0.0.13
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Rename term "session" to "token", closes #145.
- Finalise documentation for the POST /token endpoint, closes #49.
- Implement changes from #161, closes it.

## 0.0.32 - 2023-09-30
### Added
Expand Down
2 changes: 1 addition & 1 deletion docs/api-endpoints/user/get-me/200-response-body.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"email": "[email protected]",
"note": "User contains password only due to testing purposes.",
"password": "1234",
"test": "general.anonymousUser"
"scenario": "general.anonymousUser"
}
}
1 change: 0 additions & 1 deletion src/Command/DatabaseDropCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ private function deleteObjectStorage(): void
{
$this->io->startSection('Task 3 of 6: Object Storage');
$this->io->writeln('Deleting object storage data...');
// todo
$this->io->stopSection('Object storage is currently not implemented, nothing to delete.');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function testChangePasswordSuccess(): void
'currentPassword' => '1234',
'newPassword' => 'abcd',
'data' => [
'email' => '[email protected].de',
'email' => '[email protected].dev',
],
]
);
Expand All @@ -41,7 +41,7 @@ public function testChangePasswordError400(): void
'currentPassword' => '1234',
'newPassword' => 'abcd',
'data' => [
'email' => '[email protected].de',
'email' => '[email protected].dev',
],
]
);
Expand Down
2 changes: 1 addition & 1 deletion tests/ExampleGenerationController/User/PostTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class PostTokenTest extends BaseRequestTestCase
{
public const EMAIL = '[email protected].de';
public const EMAIL = '[email protected].dev';
public const PASSWORD = '1234';
private const PATH_TO_ROOT = __DIR__.'/../../../';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testCreateNode(): void
'type' => 'Data',
'data' => [
'name' => 'some name',
'test' => 'e1-01',
'scenario' => 'e1-01',
],
]
);
Expand All @@ -32,7 +32,7 @@ public function testCreateNodeWithoutType(): void
[
'data' => [
'name' => 'some name',
'test' => 'e1-01',
'scenario' => 'e1-01',
],
]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function testCreateRelation(): void
'type' => 'RELATION',
'data' => [
'name' => 'some name',
'test' => 'e1-02',
'scenario' => 'e1-02',
],
'start' => self::START,
'end' => self::END,
Expand All @@ -36,7 +36,7 @@ public function testCreateRelationWithoutType(): void
[
'data' => [
'name' => 'some name',
'test' => 'e1-02',
'scenario' => 'e1-02',
],
'start' => self::START,
'end' => self::END,
Expand All @@ -54,7 +54,7 @@ public function testCreateRelationWithoutStart(): void
'type' => 'RELATION',
'data' => [
'name' => 'some name',
'test' => 'e1-02',
'scenario' => 'e1-02',
],
'end' => self::END,
]
Expand All @@ -71,7 +71,7 @@ public function testCreateRelationWithoutEnd(): void
'type' => 'RELATION',
'data' => [
'name' => 'some name',
'test' => 'e1-02',
'scenario' => 'e1-02',
],
'start' => self::START,
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testPutNode(): void
$response = $this->runGetRequest(sprintf('/%s', self::DATA), self::TOKEN);
$this->assertIsNodeResponse($response, 'Data');
$data = $this->getBody($response)['data'];
$this->assertArrayHasKey('test', $data);
$this->assertArrayHasKey('scenario', $data);
$this->assertArrayHasKey('name', $data);
$this->assertArrayHasKey('created', $data);
$this->assertArrayHasKey('updated', $data);
Expand All @@ -25,7 +25,7 @@ public function testPutNode(): void
self::TOKEN,
[
'new-property' => 'new value',
'test' => 'e3-01',
'scenario' => 'e3-01',
]
);
print_r((string) $response->getBody());
Expand All @@ -34,7 +34,7 @@ public function testPutNode(): void
$response = $this->runGetRequest(sprintf('/%s', self::DATA), self::TOKEN);
$this->assertIsNodeResponse($response, 'Data');
$data = $this->getBody($response)['data'];
$this->assertArrayHasKey('test', $data);
$this->assertArrayHasKey('scenario', $data);
$this->assertArrayHasKey('created', $data);
$this->assertArrayHasKey('new-property', $data);
$this->assertArrayHasKey('updated', $data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testPutRelation(): void
$response = $this->runGetRequest(sprintf('/%s', self::RELATION), self::TOKEN);
$this->assertIsRelationResponse($response, 'RELATION');
$data = $this->getBody($response)['data'];
$this->assertArrayHasKey('test', $data);
$this->assertArrayHasKey('scenario', $data);
$this->assertArrayHasKey('name', $data);
$this->assertArrayHasKey('created', $data);
$this->assertArrayHasKey('updated', $data);
Expand All @@ -25,15 +25,15 @@ public function testPutRelation(): void
self::TOKEN,
[
'new-property' => 'new value',
'test' => 'e3-02',
'scenario' => 'e3-02',
]
);
$this->assertNoContentResponse($response);

$response = $this->runGetRequest(sprintf('/%s', self::RELATION), self::TOKEN);
$this->assertIsRelationResponse($response, 'RELATION');
$data = $this->getBody($response)['data'];
$this->assertArrayHasKey('test', $data);
$this->assertArrayHasKey('scenario', $data);
$this->assertArrayHasKey('created', $data);
$this->assertArrayHasKey('new-property', $data);
$this->assertArrayHasKey('updated', $data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testPutNode(): void
$response = $this->runGetRequest(sprintf('/%s', self::DATA), self::TOKEN);
$this->assertIsNodeResponse($response, 'Data');
$data = $this->getBody($response)['data'];
$this->assertArrayHasKey('test', $data);
$this->assertArrayHasKey('scenario', $data);
$this->assertArrayHasKey('name', $data);
$this->assertArrayHasKey('created', $data);
$this->assertArrayHasKey('updated', $data);
Expand All @@ -32,7 +32,7 @@ public function testPutNode(): void
$response = $this->runGetRequest(sprintf('/%s', self::DATA), self::TOKEN);
$this->assertIsNodeResponse($response, 'Data');
$data = $this->getBody($response)['data'];
$this->assertArrayHasKey('test', $data);
$this->assertArrayHasKey('scenario', $data);
$this->assertArrayHasKey('created', $data);
$this->assertArrayHasKey('new-property', $data);
$this->assertArrayHasKey('updated', $data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testPutRelation(): void
$response = $this->runGetRequest(sprintf('/%s', self::RELATION), self::TOKEN);
$this->assertIsRelationResponse($response, 'RELATION');
$data = $this->getBody($response)['data'];
$this->assertArrayHasKey('test', $data);
$this->assertArrayHasKey('scenario', $data);
$this->assertArrayHasKey('created', $data);
$this->assertArrayHasKey('updated', $data);
$this->assertArrayHasNoNullValues($data);
Expand All @@ -31,7 +31,7 @@ public function testPutRelation(): void
$response = $this->runGetRequest(sprintf('/%s', self::RELATION), self::TOKEN);
$this->assertIsRelationResponse($response, 'RELATION');
$data = $this->getBody($response)['data'];
$this->assertArrayHasKey('test', $data);
$this->assertArrayHasKey('scenario', $data);
$this->assertArrayHasKey('created', $data);
$this->assertArrayHasKey('new-property', $data);
$this->assertArrayHasKey('updated', $data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class PostChangePasswordTest extends BaseRequestTestCase
{
public const EMAIL = '[email protected].de';
public const EMAIL = '[email protected].dev';
public const PASSWORD = '1234';
public const NEW_PASSWORD = 'abcd';

Expand Down
12 changes: 6 additions & 6 deletions tests/FeatureTests/Endpoint/User/PostRegisterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function testPostRegister(): void
'type' => 'User',
'password' => '1234',
'data' => [
'email' => '[email protected].de',
'email' => '[email protected].dev',
],
]
);
Expand All @@ -31,7 +31,7 @@ public function testPostRegisterWithoutType(): void
[
'password' => '1234',
'data' => [
'email' => '[email protected].de',
'email' => '[email protected].dev',
],
]
);
Expand All @@ -48,7 +48,7 @@ public function testPostRegisterWithWrongType(): void
'type' => 'NotAUser',
'password' => '1234',
'data' => [
'email' => '[email protected].de',
'email' => '[email protected].dev',
],
]
);
Expand All @@ -64,7 +64,7 @@ public function testPostRegisterWithNoPassword(): void
[
'type' => 'User',
'data' => [
'email' => '[email protected].de',
'email' => '[email protected].dev',
],
]
);
Expand Down Expand Up @@ -97,7 +97,7 @@ public function testPostRegisterFailsForDuplicateEmail(): void
'type' => 'User',
'password' => '1234',
'data' => [
'email' => '[email protected].de',
'email' => '[email protected].dev',
],
]
);
Expand All @@ -111,7 +111,7 @@ public function testPostRegisterFailsForDuplicateEmail(): void
'type' => 'User',
'password' => '1234',
'data' => [
'email' => '[email protected].de',
'email' => '[email protected].dev',
],
]
);
Expand Down
2 changes: 1 addition & 1 deletion tests/FeatureTests/Endpoint/User/PostTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class PostTokenTest extends BaseRequestTestCase
{
public const TOKEN = 'secret-token:3tgEP9MhD81rkp3qiJcm1U';
public const EMAIL = '[email protected].de';
public const EMAIL = '[email protected].dev';
public const PASSWORD = '1234';

public function testPostToken(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function test2010305(): void
'type' => 'Data',
'data' => [
'name' => 'I shall exist.',
'test' => '2-01',
'scenario' => '2-01',
],
]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private function baseSearchTest(string $token): void
[
'query' => [
'term' => [
'test.keyword' => 'security.limitedAccess.searchAccess',
'scenario.keyword' => 'security.limitedAccess.searchAccess',
],
],
'nodeTypes' => ['Data'],
Expand Down

0 comments on commit 5cf4cba

Please sign in to comment.