Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-04-22 16:43:57 +0300
committerJoas Schilling <coding@schilljs.com>2021-04-22 16:43:57 +0300
commit83e10b7a736f7cfa9c933d0476b4784a062bb222 (patch)
treefbf12e45a151609210a8f07dc505fd8fc771d519 /build/integration
parent4ed296db9f452985bc129409147594a155c96818 (diff)
Adjust integration test
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'build/integration')
-rw-r--r--build/integration/features/bootstrap/RemoteContext.php8
-rw-r--r--build/integration/remoteapi_features/remote.feature3
2 files changed, 9 insertions, 2 deletions
diff --git a/build/integration/features/bootstrap/RemoteContext.php b/build/integration/features/bootstrap/RemoteContext.php
index 38f3ab76487..69ebad43208 100644
--- a/build/integration/features/bootstrap/RemoteContext.php
+++ b/build/integration/features/bootstrap/RemoteContext.php
@@ -138,7 +138,13 @@ class RemoteContext implements Context {
* @param string $value
*/
public function hasCapability($key, $value) {
- $capabilities = $this->getApiClient()->getCapabilities();
+ try {
+ $capabilities = $this->getApiClient()->getCapabilities();
+ } catch (\Exception $e) {
+ Assert::assertInstanceOf($value, $e);
+ $this->lastException = $e;
+ return;
+ }
$current = $capabilities;
$parts = explode('.', $key);
foreach ($parts as $part) {
diff --git a/build/integration/remoteapi_features/remote.feature b/build/integration/remoteapi_features/remote.feature
index 72daf8226cd..62fd95e0130 100644
--- a/build/integration/remoteapi_features/remote.feature
+++ b/build/integration/remoteapi_features/remote.feature
@@ -34,4 +34,5 @@ Feature: remote
Given using remote server "REMOTE"
And user "user0" exists
And using credentials "user0", "invalid"
- Then the capability "theming.name" is "Nextcloud"
+ Then the capability "theming.name" is "OC\ForbiddenException"
+ Then the request should throw a "OC\ForbiddenException"