fixed tests
This commit is contained in:
parent
593386b16b
commit
39a269d10a
tests/Feature/Initialize
|
@ -3,7 +3,6 @@
|
|||
namespace Tests\Feature\Initialize;
|
||||
|
||||
use App\Initialize\Actions\InitializeAction;
|
||||
use App\Setting\NamiSettings;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Tests\RequestFactories\InitializeRequestFactory;
|
||||
use Tests\TestCase;
|
||||
|
@ -23,22 +22,6 @@ class InitializeActionTest extends TestCase
|
|||
$response->assertRedirect('/login');
|
||||
}
|
||||
|
||||
public function testItSetsSettingsBeforeRunningInitializer(): void
|
||||
{
|
||||
$this->withoutExceptionHandling()->login();
|
||||
InitializeAction::partialMock()->shouldReceive('handle')->andReturn(true);
|
||||
Auth::success(12345, 'secret');
|
||||
app(GroupFake::class)->fetches(null, [185 => ['name' => 'testgroup']]);
|
||||
|
||||
$response = $this->post('/initialize', $this->factory()->withCredentials(12345, 'secret')->withGroup(185)->create());
|
||||
|
||||
$response->assertRedirect('/');
|
||||
$settings = app(NamiSettings::class);
|
||||
$this->assertEquals(12345, $settings->mglnr);
|
||||
$this->assertEquals('secret', $settings->password);
|
||||
$this->assertEquals(185, $settings->default_group_id);
|
||||
}
|
||||
|
||||
public function testItValidatesSetupInfo(): void
|
||||
{
|
||||
$this->login();
|
||||
|
|
Loading…
Reference in New Issue