]> BookStack Code Mirror - bookstack/blobdiff - tests/Commands/UpdateUrlCommandTest.php
Change JsonDebugException to Responsable interface
[bookstack] / tests / Commands / UpdateUrlCommandTest.php
index 1788e9452a697983f2ecfa4feb500f58b6f69b73..280c81febd1cad9a67db4af638dd69ee4b0a2023 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace Tests\Commands;
 
+use Illuminate\Support\Facades\Artisan;
 use Symfony\Component\Console\Exception\RuntimeException;
 use Tests\TestCase;
 
@@ -34,6 +35,13 @@ class UpdateUrlCommandTest extends TestCase
         $this->artisan('bookstack:update-url https://cats.example.com');
     }
 
+    public function test_command_force_option_skips_prompt()
+    {
+        $this->artisan('bookstack:update-url --force https://cats.example.com/donkey https://cats.example.com/monkey')
+            ->expectsOutputToContain('URL update procedure complete')
+            ->assertSuccessful();
+    }
+
     public function test_command_updates_settings()
     {
         setting()->put('my-custom-item', 'https://example.com/donkey/cat');