aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ApiBundle/Controller/UserRestControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ApiBundle/Controller/UserRestControllerTest.php')
-rw-r--r--tests/Wallabag/ApiBundle/Controller/UserRestControllerTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/UserRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/UserRestControllerTest.php
index 5735bc58..9f01a976 100644
--- a/tests/Wallabag/ApiBundle/Controller/UserRestControllerTest.php
+++ b/tests/Wallabag/ApiBundle/Controller/UserRestControllerTest.php
@@ -61,10 +61,16 @@ class UserRestControllerTest extends WallabagApiTestCase
61 $this->assertArrayHasKey('username', $content); 61 $this->assertArrayHasKey('username', $content);
62 $this->assertArrayHasKey('created_at', $content); 62 $this->assertArrayHasKey('created_at', $content);
63 $this->assertArrayHasKey('updated_at', $content); 63 $this->assertArrayHasKey('updated_at', $content);
64 $this->assertArrayHasKey('default_client', $content);
64 65
65 $this->assertEquals('wallabag@google.com', $content['email']); 66 $this->assertEquals('wallabag@google.com', $content['email']);
66 $this->assertEquals('google', $content['username']); 67 $this->assertEquals('google', $content['username']);
67 68
69 $this->assertArrayHasKey('client_secret', $content['default_client']);
70 $this->assertArrayHasKey('client_id', $content['default_client']);
71
72 $this->assertEquals('Default client', $content['default_client']['name']);
73
68 $this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type')); 74 $this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type'));
69 75
70 $this->client->getContainer()->get('craue_config')->set('api_user_registration', 0); 76 $this->client->getContainer()->get('craue_config')->set('api_user_registration', 0);
@@ -90,10 +96,16 @@ class UserRestControllerTest extends WallabagApiTestCase
90 $this->assertArrayHasKey('username', $content); 96 $this->assertArrayHasKey('username', $content);
91 $this->assertArrayHasKey('created_at', $content); 97 $this->assertArrayHasKey('created_at', $content);
92 $this->assertArrayHasKey('updated_at', $content); 98 $this->assertArrayHasKey('updated_at', $content);
99 $this->assertArrayHasKey('default_client', $content);
93 100
94 $this->assertEquals('wallabag@google.com', $content['email']); 101 $this->assertEquals('wallabag@google.com', $content['email']);
95 $this->assertEquals('google', $content['username']); 102 $this->assertEquals('google', $content['username']);
96 103
104 $this->assertArrayHasKey('client_secret', $content['default_client']);
105 $this->assertArrayHasKey('client_id', $content['default_client']);
106
107 $this->assertEquals('Default client', $content['default_client']['name']);
108
97 $this->assertEquals('application/json', $client->getResponse()->headers->get('Content-Type')); 109 $this->assertEquals('application/json', $client->getResponse()->headers->get('Content-Type'));
98 110
99 $client->getContainer()->get('craue_config')->set('api_user_registration', 0); 111 $client->getContainer()->get('craue_config')->set('api_user_registration', 0);