artisan('db:seed'); }); test('enable two factor', function () { Setting::set('approval.enabled', false); $this->assertFalse(Setting::get('approval.enabled')); $this->actingAsAdmin() ->from('/settings/auth') ->post('/settings/auth/approval/enable') ->assertRedirect('/settings/auth'); $this->assertTrue(Setting::get('approval.enabled')); }); test('disable two factor', function () { Setting::set('approval.enabled', true); $this->assertTrue(Setting::get('approval.enabled')); $this->actingAsAdmin() ->from('/settings/auth') ->post('/settings/auth/approval/disable') ->assertRedirect('/settings/auth'); $this->assertFalse(Setting::get('approval.enabled')); });