[users] Make test more expressive

This commit is contained in:
Adriaan de Groot 2022-05-18 14:37:02 +02:00
parent 7d5a4eafa2
commit cebafcf869

View File

@ -120,6 +120,11 @@ UserTests::testGetSet()
QVERIFY( c.loginNameStatus().isEmpty() ); // now it's still ok QVERIFY( c.loginNameStatus().isEmpty() ); // now it's still ok
QCOMPARE( c.loginName(), lg ); QCOMPARE( c.loginName(), lg );
QCOMPARE( c.fullName(), ful ); QCOMPARE( c.fullName(), ful );
}
// Test forbidden login names
{
QVERIFY( c.forbiddenLoginNames().contains( QStringLiteral( "root" ) ) );
QVERIFY( c.loginNameStatus().isEmpty() ); // it's ok now
c.setLoginName( "root" ); c.setLoginName( "root" );
QVERIFY( !c.loginNameStatus().isEmpty() ); // can't be root QVERIFY( !c.loginNameStatus().isEmpty() ); // can't be root
} }