File indexing completed on 2024-12-01 04:35:24

0001 /*
0002    SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "listmessagesmodeltest.h"
0008 #include "model/listmessagesmodel.h"
0009 
0010 #include <QTest>
0011 QTEST_GUILESS_MAIN(ListMessagesModelTest)
0012 
0013 ListMessagesModelTest::ListMessagesModelTest(QObject *parent)
0014     : QObject(parent)
0015 {
0016 }
0017 
0018 void ListMessagesModelTest::shouldHaveDefaultValues()
0019 {
0020     ListMessagesModel w;
0021     QVERIFY(!w.roomId().isEmpty()); // By default we define a name! Need to fix it
0022     QVERIFY(!w.loadMoreListMessagesInProgress());
0023     QCOMPARE(w.listMessageType(), ListMessagesModel::ListMessageType::Unknown);
0024     QCOMPARE(w.total(), -1);
0025 }
0026 
0027 #include "moc_listmessagesmodeltest.cpp"