A free open source IT asset/license management system
Fixed failing test on GH
snipe09b5ae2c9e16
diff --git a/tests/Feature/Users/Ui/TwoFactorResetTest.php b/tests/Feature/Users/Ui/TwoFactorResetTest.phpindex 770166a354..7e0b6d1e8a 100644--- a/tests/Feature/Users/Ui/TwoFactorResetTest.php+++ b/tests/Feature/Users/Ui/TwoFactorResetTest.php@@ -85,9 +85,12 @@ class TwoFactorResetTest extends TestCasepublic function test_button_hidden_when_site_two_factor_is_off(){- // Empty string is the CheckForTwoFactor middleware's real "off" signal —- // the middleware treats "0" as on-but-misconfigured and still redirects.- $this->settings->set(['two_factor_enabled' => '']);+ // NULL is the only "off" signal that survives both SQLite and MySQL.+ // The column is tinyInteger, so an empty string coerces to 0 on MySQL,+ // and the CheckForTwoFactor middleware then treats "0" as on-but-broken+ // and redirects (302), while on SQLite the empty string is stored as-is+ // and the middleware short-circuits (200). Local vs CI divergence.+ $this->settings->set(['two_factor_enabled' => null]);$actor = User::factory()->superuser()->create();$target = User::factory()->create([