diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-06-29 13:35:17 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-08-08 14:25:43 +0200 |
commit | de403f2f3da09015a07400d90703642a5eabcc65 (patch) | |
tree | 1b18e19e27ddf19c3e8c9cfca99747a0e39501be /build/integration/features/bootstrap/Provisioning.php | |
parent | 382b27d03524d18885330847cc8dc261b041c027 (diff) | |
download | nextcloud-server-de403f2f3da09015a07400d90703642a5eabcc65.tar.gz nextcloud-server-de403f2f3da09015a07400d90703642a5eabcc65.zip |
Add integration test for creating room shares when Talk is not enabled
The test just ensures that the controller will gracefully reject the
creation instead of failing miserably; the integration tests when Talk
is enabled are in the Talk repository.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build/integration/features/bootstrap/Provisioning.php')
-rw-r--r-- | build/integration/features/bootstrap/Provisioning.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/Provisioning.php b/build/integration/features/bootstrap/Provisioning.php index 1a2c32ed8c6..c320be2be6c 100644 --- a/build/integration/features/bootstrap/Provisioning.php +++ b/build/integration/features/bootstrap/Provisioning.php @@ -680,6 +680,30 @@ trait Provisioning { } /** + * @Given /^app "([^"]*)" is not enabled$/ + * + * Checks that the app is disabled or not installed. + * + * @param string $app + */ + public function appIsNotEnabled($app) { + $fullUrl = $this->baseUrl . "v2.php/cloud/apps?filter=enabled"; + $client = new Client(); + $options = []; + if ($this->currentUser === 'admin') { + $options['auth'] = $this->adminUser; + } + $options['headers'] = [ + 'OCS-APIREQUEST' => 'true', + ]; + + $this->response = $client->get($fullUrl, $options); + $respondedArray = $this->getArrayOfAppsResponded($this->response); + Assert::assertNotContains($app, $respondedArray); + Assert::assertEquals(200, $this->response->getStatusCode()); + } + + /** * @Then /^user "([^"]*)" is disabled$/ * @param string $user */ |