[users] Repair test of now-removed "nonempty" option

This commit is contained in:
Adriaan de Groot 2023-12-11 22:55:36 +01:00
parent 15710ef814
commit 8e5fbef390

View File

@ -338,10 +338,10 @@ UserTests::testPasswordChecks()
{
PasswordCheckList l;
QCOMPARE( l.length(), 0 );
QVERIFY( !addPasswordCheck( "nonempty", QVariant( false ), l ) ); // a silly setting
QVERIFY( !addPasswordCheck( "nonempty", QVariant( false ), l ) ); // legacy option, now ignored
QCOMPARE( l.length(), 0 );
QVERIFY( !addPasswordCheck( "nonempty", QVariant( true ), l ) ); // still ignored
QCOMPARE( l.length(), 0 );
QVERIFY( addPasswordCheck( "nonempty", QVariant( true ), l ) );
QCOMPARE( l.length(), 1 );
}
}