From f3d343190591b695c46730064a0a123d1495f359 Mon Sep 17 00:00:00 2001 From: ScharfViktor Date: Tue, 21 Dec 2021 18:22:32 +0100 Subject: [PATCH] add check OCS status to steps --- .../acceptance/features/apiSpaces/shareSpaces.feature | 2 ++ tests/acceptance/features/bootstrap/SpacesContext.php | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/features/apiSpaces/shareSpaces.feature b/tests/acceptance/features/apiSpaces/shareSpaces.feature index fbddf1ca6..c65eac05d 100644 --- a/tests/acceptance/features/apiSpaces/shareSpaces.feature +++ b/tests/acceptance/features/apiSpaces/shareSpaces.feature @@ -16,6 +16,8 @@ Feature: Share spaces Given user "Alice" has created a space "Space to share" of type "project" with quota "10" When user "Alice" shares a space "Space to share" to user "Brian" Then the HTTP status code should be "200" + And the OCS status code should be "200" + And the OCS status message should be "OK" Scenario: A user can see that a received shared space is available diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index bb8bffe90..0ce7094aa 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -1178,7 +1178,16 @@ class SpacesContext implements Context { } $fullUrl = $baseUrl . "ocs/v2.php/apps/files_sharing/api/v1/shares"; - HttpRequestHelper::post($fullUrl, "", $user, $this->featureContext->getPasswordForUser($user), [], $body); + $this->featureContext->setResponse( + HttpRequestHelper::post( + $fullUrl, + "", + $user, + $this->featureContext->getPasswordForUser($user), + [], + $body + ) + ); } /**