aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-03-26 19:55:13 +0100
committerLukas Reschke <lukas@owncloud.com>2015-03-26 19:55:13 +0100
commitc8c722bc6de3a58e10ba42a55a178d3ba9308bae (patch)
tree6d62aa73cc72596b1bf385cca20e4d8bd9563525 /apps/files_versions/tests
parent3e57e9d3e557100ba0b51f08a3de7a7e8f79f4bd (diff)
parent6447962f2a3bd845be9ee494f400958371f6e2f9 (diff)
downloadnextcloud-server-c8c722bc6de3a58e10ba42a55a178d3ba9308bae.tar.gz
nextcloud-server-c8c722bc6de3a58e10ba42a55a178d3ba9308bae.zip
Merge pull request #15129 from owncloud/version-command-bus
expire versions in a background command
Diffstat (limited to 'apps/files_versions/tests')
-rw-r--r--apps/files_versions/tests/versions.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_versions/tests/versions.php b/apps/files_versions/tests/versions.php
index 636a0eec984..6852f769a3d 100644
--- a/apps/files_versions/tests/versions.php
+++ b/apps/files_versions/tests/versions.php
@@ -246,6 +246,8 @@ class Test_Files_Versioning extends \Test\TestCase {
// execute rename hook of versions app
\OC\Files\Filesystem::rename("test.txt", "test2.txt");
+ $this->runCommands();
+
$this->assertFalse($this->rootView->file_exists($v1));
$this->assertFalse($this->rootView->file_exists($v2));
@@ -288,8 +290,11 @@ class Test_Files_Versioning extends \Test\TestCase {
// execute rename hook of versions app
\OC\Files\Filesystem::rename('/folder1/test.txt', '/folder1/folder2/test.txt');
+
self::loginHelper(self::TEST_VERSIONS_USER2);
+ $this->runCommands();
+
$this->assertFalse($this->rootView->file_exists($v1));
$this->assertFalse($this->rootView->file_exists($v2));
@@ -333,6 +338,8 @@ class Test_Files_Versioning extends \Test\TestCase {
self::loginHelper(self::TEST_VERSIONS_USER);
+ $this->runCommands();
+
$this->assertTrue($this->rootView->file_exists($v1));
$this->assertTrue($this->rootView->file_exists($v2));
@@ -364,6 +371,8 @@ class Test_Files_Versioning extends \Test\TestCase {
// execute copy hook of versions app
\OC\Files\Filesystem::copy("test.txt", "test2.txt");
+ $this->runCommands();
+
$this->assertTrue($this->rootView->file_exists($v1));
$this->assertTrue($this->rootView->file_exists($v2));
@@ -417,7 +426,9 @@ class Test_Files_Versioning extends \Test\TestCase {
public static function loginHelper($user, $create = false) {
if ($create) {
- \OC_User::createUser($user, $user);
+ $backend = new \OC_User_Dummy();
+ $backend->createUser($user, $user);
+ \OC::$server->getUserManager()->registerBackend($backend);
}
\OC_Util::tearDownFS();