From 6260a1a156d81444c9fa4a2f258cd28e40533460 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Mon, 14 Nov 2022 13:00:50 +0000 Subject: [PATCH] change authDuration to duration and update tests --- .../Services/Projects/ProjectsConsoleClientTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 0851359b9..ecd3fd69d 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -404,11 +404,11 @@ class ProjectsConsoleClientTest extends Scope * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/authDuration', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/duration', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'duration' => '2', // Set session duration to 2 minutes + 'duration' => '1', // Set session duration to 2 minutes ]); $this->assertEquals(200, $response['headers']['status-code']); @@ -417,7 +417,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertArrayHasKey('platforms', $response['body']); $this->assertArrayHasKey('webhooks', $response['body']); $this->assertArrayHasKey('keys', $response['body']); - $this->assertEquals(60, $response['body']['auths']['duration']); + $this->assertEquals(60, $response['body']['authDuration']); $projectId = $response['body']['$id']; @@ -471,7 +471,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(401, $response['headers']['status-code']); // Return project back to normal - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/authDuration', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/duration', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -488,7 +488,7 @@ class ProjectsConsoleClientTest extends Scope ], $this->getHeaders())); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(31536000, $response['body']['duration']); // 1 Year + $this->assertEquals(31536000, $response['body']['authDuration']); // 1 Year return ['projectId' => $projectId]; }