]> source.dussan.org Git - nextcloud-server.git/commitdiff
make sure that we are logged in ad user1 while performing the tests
authorBjoern Schiessle <schiessle@owncloud.com>
Thu, 10 Oct 2013 08:47:35 +0000 (10:47 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Thu, 10 Oct 2013 08:47:35 +0000 (10:47 +0200)
apps/files_sharing/tests/api.php

index c55c186f089a92787df0b21129307b4e8e640971..2feea9e7e2473028539a239a3cce5cae0983368f 100644 (file)
@@ -58,6 +58,10 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
        }
 
        function setUp() {
+
+               //login as user1
+               \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1);
+
                $this->data = 'foobar';
                $this->view = new \OC_FilesystemView('/' . \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1 . '/files');
 
@@ -104,9 +108,6 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
         */
        function testCreateShare() {
 
-               //login as user1
-               \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1);
-
                // share to user
 
                // simulate a post request