diff --git a/tests/Fileshare/AdapterTest.php b/tests/Fileshare/AdapterTest.php index 4d823f4d..7fb39c0a 100644 --- a/tests/Fileshare/AdapterTest.php +++ b/tests/Fileshare/AdapterTest.php @@ -10,20 +10,20 @@ class AdapterTest extends FileshareTestCase { public function testItGetsFilesInRoot(): void { - $this->withoutExceptionHandling()->login()->loginNami()->withUser('badenpowell', 'secret') + $this->withoutExceptionHandling()->login()->loginNami()->withUser('badenpowell', 'oowoh2vahghai7aezahCeexae') ->withDirs('badenpowell', []); - $storage = OwncloudConnection::from(['user' => 'badenpowell', 'password' => 'secret', 'base_url' => env('TEST_OWNCLOUD_DOMAIN')])->getFilesystem(); + $storage = OwncloudConnection::from(['user' => 'badenpowell', 'password' => 'oowoh2vahghai7aezahCeexae', 'base_url' => env('TEST_OWNCLOUD_DOMAIN')])->getFilesystem(); $storage->put('/test.pdf', ''); $this->assertEquals(['test.pdf'], $storage->files('/')); } public function testItGetsFilesInSubdirectory(): void { - $this->withoutExceptionHandling()->login()->loginNami()->withUser('badenpowell', 'secret') + $this->withoutExceptionHandling()->login()->loginNami()->withUser('badenpowell', 'oowoh2vahghai7aezahCeexae') ->withDirs('badenpowell', ['/pictures']); - $storage = OwncloudConnection::from(['user' => 'badenpowell', 'password' => 'secret', 'base_url' => env('TEST_OWNCLOUD_DOMAIN')])->getFilesystem(); + $storage = OwncloudConnection::from(['user' => 'badenpowell', 'password' => 'oowoh2vahghai7aezahCeexae', 'base_url' => env('TEST_OWNCLOUD_DOMAIN')])->getFilesystem(); $storage->put('/pictures/test.pdf', ''); $this->assertEquals([], $storage->files('/')); $this->assertEquals(['pictures/test.pdf'], $storage->files('/pictures')); diff --git a/tests/Fileshare/ExportSyncActionTest.php b/tests/Fileshare/ExportSyncActionTest.php index 27254a35..027454fe 100644 --- a/tests/Fileshare/ExportSyncActionTest.php +++ b/tests/Fileshare/ExportSyncActionTest.php @@ -31,9 +31,9 @@ class ExportSyncActionTest extends FileshareTestCase public function testItUploadsRootFile(): void { - $this->withoutExceptionHandling()->withUser('badenpowell', 'secret')->withDirs('badenpowell', ['/abc']); + $this->withoutExceptionHandling()->withUser('badenpowell', 'zai8hie3oozaiX5queey0Xa9a')->withDirs('badenpowell', ['/abc']); $connection = Fileshare::factory() - ->type(OwncloudConnection::from(['user' => 'badenpowell', 'password' => 'secret', 'base_url' => env('TEST_OWNCLOUD_DOMAIN')])) + ->type(OwncloudConnection::from(['user' => 'badenpowell', 'password' => 'zai8hie3oozaiX5queey0Xa9a', 'base_url' => env('TEST_OWNCLOUD_DOMAIN')])) ->create(); $form = Form::factory()->name('Formular')->fields([ $this->textField('vorname'), @@ -49,9 +49,9 @@ class ExportSyncActionTest extends FileshareTestCase public function testItUploadsGroupFile(): void { - $this->withoutExceptionHandling()->withUser('badenpowell', 'secret')->withDirs('badenpowell', ['/abc', '/stamm']); + $this->withoutExceptionHandling()->withUser('badenpowell', 'Aejahpoopood1Keetaaghoe0Z')->withDirs('badenpowell', ['/abc', '/stamm']); $connection = Fileshare::factory() - ->type(OwncloudConnection::from(['user' => 'badenpowell', 'password' => 'secret', 'base_url' => env('TEST_OWNCLOUD_DOMAIN')])) + ->type(OwncloudConnection::from(['user' => 'badenpowell', 'password' => 'Aejahpoopood1Keetaaghoe0Z', 'base_url' => env('TEST_OWNCLOUD_DOMAIN')])) ->create(); $group = Group::factory()->create(['fileshare' => FileshareResourceData::from(['connection_id' => $connection->id, 'resource' => '/stamm'])]); $form = Form::factory()->name('Formular')->fields([ diff --git a/tests/Fileshare/FileshareIndexActionTest.php b/tests/Fileshare/FileshareIndexActionTest.php index b9632b22..62f02f8e 100644 --- a/tests/Fileshare/FileshareIndexActionTest.php +++ b/tests/Fileshare/FileshareIndexActionTest.php @@ -2,6 +2,7 @@ namespace Tests\Fileshare; +use App\Fileshare\ConnectionTypes\NextcloudConnection; use App\Fileshare\ConnectionTypes\OwncloudConnection; use App\Fileshare\Models\Fileshare; use Tests\FileshareTestCase; @@ -28,9 +29,12 @@ class FileshareIndexActionTest extends FileshareTestCase ->assertJsonPath('data.0.links.update', route('fileshare.update', ['fileshare' => $connection])) ->assertJsonPath('meta.default.name', '') ->assertJsonPath('meta.links.store', route('fileshare.store')) - ->assertJsonPath('meta.types.0.id', OwncloudConnection::class) - ->assertJsonPath('meta.types.0.name', 'Owncloud') + ->assertJsonPath('meta.types.0.id', NextcloudConnection::class) + ->assertJsonPath('meta.types.0.name', 'Nextcloud') ->assertJsonPath('meta.types.0.defaults.base_url', '') + ->assertJsonPath('meta.types.1.id', OwncloudConnection::class) + ->assertJsonPath('meta.types.1.name', 'Owncloud') + ->assertJsonPath('meta.types.1.defaults.base_url', '') ->assertJsonPath('meta.types.0.fields.1', ['label' => 'Benutzer', 'key' => 'user', 'type' => 'text']); }