docker-itmgmt/speedtest/volumes/config/www/tests/Feature/Commands/SetSlackWebhookCommandTest.php

30 lines
702 B
PHP
Raw Normal View History

2023-03-29 15:20:05 +00:00
<?php
namespace Tests\Feature\Commands;
use App\Helpers\SettingsHelper;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class SetSlackWebhookCommandTest extends TestCase
{
use RefreshDatabase;
/**
* A basic feature test example.
*
* @return void
*/
public function testSetSlackWebhook()
{
SettingsHelper::set('slack_webhook', 'pre-test');
$this->artisan('speedtest:slack', [ 'webhook' => 'test' ])
->expectsOutput('Slack webhook updated')
->assertExitCode(0);
$this->assertEquals(SettingsHelper::get('slack_webhook')->value, 'test');
}
}