From 2911c789f928d65307e315aaf2f58dd56d183ba5 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 14 Oct 2020 15:15:47 +0200 Subject: [PATCH] [users] Fix up tests for login status - an empty login name is "ok" even if it isn't -- there's no warning message in that case --- src/modules/users/Tests.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/users/Tests.cpp b/src/modules/users/Tests.cpp index b1ec8ebbc..5259fb8a8 100644 --- a/src/modules/users/Tests.cpp +++ b/src/modules/users/Tests.cpp @@ -102,12 +102,14 @@ UserTests::testGetSet() const QString lg( "jjkk" ); QCOMPARE( c.fullName(), QString() ); QCOMPARE( c.loginName(), QString() ); - QVERIFY( !c.loginNameStatus().isEmpty() ); // login name is not ok + QVERIFY( c.loginNameStatus().isEmpty() ); // empty login name is ok c.setLoginName( lg ); c.setFullName( ful ); - QVERIFY( c.loginNameStatus().isEmpty() ); // now it's ok + QVERIFY( c.loginNameStatus().isEmpty() ); // now it's still ok QCOMPARE( c.loginName(), lg ); QCOMPARE( c.fullName(), ful ); + c.setLoginName( "root" ); + QVERIFY( !c.loginNameStatus().isEmpty() ); // can't be root } }