Fix tests

This commit is contained in:
Bubka 2024-09-27 00:00:53 +02:00
parent c00b04e192
commit d826800985
3 changed files with 6 additions and 4 deletions

View File

@ -593,7 +593,8 @@ class UserManagerControllerTest extends FeatureTestCase
->json('GET', '/api/v1/users/' . $this->user->id . '/authentications') ->json('GET', '/api/v1/users/' . $this->user->id . '/authentications')
->assertJsonCount(1); ->assertJsonCount(1);
$this->assertEquals($response->getData()[0]->id, $this->user->id); $userAuthLog = AuthLog::find($response->getData()[0]->id);
$this->assertEquals($userAuthLog->authenticatable_id, $this->user->id);
} }
#[Test] #[Test]

File diff suppressed because one or more lines are too long

View File

@ -144,6 +144,7 @@ class SettingServiceTest extends FeatureTestCase
public function test_all_returns_default_and_overloaded_settings() public function test_all_returns_default_and_overloaded_settings()
{ {
$default_options = config('2fauth.settings'); $default_options = config('2fauth.settings');
unset($default_options['lastRadarScan']);
Settings::set(self::SETTING_NAME, self::SETTING_VALUE_STRING); Settings::set(self::SETTING_NAME, self::SETTING_VALUE_STRING);