From 6719f8ca60e10b0f1064935ecccf708383532a89 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 21 Mar 2016 10:25:58 +0100 Subject: [PATCH] Add intergration tests * Only for sharees right now * Sharing intergration tests fail due to the test setup we have right now --- .../features/bootstrap/ShareesContext.php | 1 + .../integration/sharees_features/sharees.feature | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/build/integration/features/bootstrap/ShareesContext.php b/build/integration/features/bootstrap/ShareesContext.php index de50eeb2be..bd08ae6e13 100644 --- a/build/integration/features/bootstrap/ShareesContext.php +++ b/build/integration/features/bootstrap/ShareesContext.php @@ -68,5 +68,6 @@ class ShareesContext implements Context, SnippetAcceptingContext { protected function resetAppConfigs() { $this->modifyServerConfig('core', 'shareapi_only_share_with_group_members', 'no'); $this->modifyServerConfig('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes'); + $this->modifyServerConfig('core', 'shareapi_allow_group_sharing', 'yes'); } } diff --git a/build/integration/sharees_features/sharees.feature b/build/integration/sharees_features/sharees.feature index 5765b937a6..58570cfc5f 100644 --- a/build/integration/sharees_features/sharees.feature +++ b/build/integration/sharees_features/sharees.feature @@ -222,3 +222,19 @@ Feature: sharees Then "groups" sharees returned is empty Then "exact remotes" sharees returned is empty Then "remotes" sharees returned is empty + + Scenario: Group sharees not returned when group sharing is disabled + Given As an "test" + And parameter "shareapi_allow_group_sharing" of app "core" is set to "no" + When getting sharees for + | search | sharee | + | itemType | file | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And "exact users" sharees returned is empty + And "users" sharees returned are + | Sharee1 | 0 | Sharee1 | + And "exact groups" sharees returned is empty + And "groups" sharees returned is empty + And "exact remotes" sharees returned is empty + And "remotes" sharees returned is empty