1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Added force option for update-url command

Includes test to cover.
Closes #4223
This commit is contained in:
Dan Brown
2023-05-06 23:05:25 +01:00
parent 57bdd83d8c
commit 573bc3ec45
2 changed files with 28 additions and 23 deletions

View 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');