diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 9737eefb96c72ec021bbb32e9ba35646e446a685..16cdc88f1c0846355fe8ae0182e2a483e7603efe 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -649,7 +649,7 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
 
         $this->assertEquals( $this->dataLong, $decrypt );
 
-        $newFolder = '/newfolder1';
+        $newFolder = '/newfolder'.time();
         $newFilename = 'tmp-new-'.time();
         $view = new \OC\Files\View('/' . $this->userId . '/files');
         $view->mkdir($newFolder);
@@ -664,6 +664,39 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
         $view->unlink( $newFolder );
     }
 
+	function testMoveFolder() {
+
+		$view = new \OC\Files\View('/' . $this->userId . '/files');
+
+		$filename = '/tmp-'.time();
+		$folder = '/folder'.time();
+
+		$view->mkdir($folder);
+
+		// Save long data as encrypted file using stream wrapper
+		$cryptedFile = file_put_contents( 'crypt://' . $folder . $filename, $this->dataLong );
+
+		// Test that data was successfully written
+		$this->assertTrue( is_int( $cryptedFile ) );
+
+		// Get file decrypted contents
+		$decrypt = file_get_contents( 'crypt://' . $folder . $filename );
+
+		$this->assertEquals( $this->dataLong, $decrypt );
+
+		$newFolder = '/newfolder'.time();
+
+		$view->rename( $folder, $newFolder );
+
+		// Get file decrypted contents
+		$newDecrypt = file_get_contents( 'crypt://' . $newFolder . $filename );
+
+		$this->assertEquals( $this->dataLong, $newDecrypt );
+
+		// tear down
+		$view->unlink( $newFolder );
+	}
+
 	function testRenameFolder() {
 
 		$filename = '/tmp-'.time();