mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 03:37:47 +00:00
Fix autotest compilation
This commit is contained in:
parent
225a42ada1
commit
a858f8033e
2 changed files with 2 additions and 16 deletions
|
@ -36,14 +36,6 @@ private Q_SLOTS:
|
||||||
QVERIFY(!accountManager.canDelete(nullptr));
|
QVERIFY(!accountManager.canDelete(nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void testAccountManagement_data()
|
|
||||||
{
|
|
||||||
QTest::addColumn<bool>("isSapphire");
|
|
||||||
|
|
||||||
QTest::addRow("se") << false;
|
|
||||||
QTest::addRow("sapphire") << true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void testAccountManagement()
|
void testAccountManagement()
|
||||||
{
|
{
|
||||||
AccountManager accountManager;
|
AccountManager accountManager;
|
||||||
|
@ -61,13 +53,7 @@ private Q_SLOTS:
|
||||||
QCOMPARE(accountAddedSpy.count(), 0);
|
QCOMPARE(accountAddedSpy.count(), 0);
|
||||||
QVERIFY(!accountManager.hasAnyAccounts());
|
QVERIFY(!accountManager.hasAnyAccounts());
|
||||||
|
|
||||||
QFETCH(bool, isSapphire);
|
|
||||||
|
|
||||||
if (isSapphire) {
|
|
||||||
accountManager.createSapphireAccount(QStringLiteral("foo.com"), QStringLiteral("foo"));
|
|
||||||
} else {
|
|
||||||
accountManager.createSquareEnixAccount(QStringLiteral("foo"), static_cast<int>(Account::GameLicense::WindowsStandalone), true);
|
accountManager.createSquareEnixAccount(QStringLiteral("foo"), static_cast<int>(Account::GameLicense::WindowsStandalone), true);
|
||||||
}
|
|
||||||
|
|
||||||
QCOMPARE(accountsChangedSpy.count(), 1);
|
QCOMPARE(accountsChangedSpy.count(), 1);
|
||||||
QCOMPARE(accountAddedSpy.count(), 1);
|
QCOMPARE(accountAddedSpy.count(), 1);
|
||||||
|
|
|
@ -55,7 +55,7 @@ private Q_SLOTS:
|
||||||
QCOMPARE(profileManager.numProfiles(), 2);
|
QCOMPARE(profileManager.numProfiles(), 2);
|
||||||
QVERIFY(profileManager.canDelete(profileManager.getProfile(1)));
|
QVERIFY(profileManager.canDelete(profileManager.getProfile(1)));
|
||||||
|
|
||||||
profileManager.deleteProfile(profileManager.getProfile(1));
|
profileManager.deleteProfile(profileManager.getProfile(1), false);
|
||||||
|
|
||||||
QCOMPARE(profileManager.rowCount({}), 1);
|
QCOMPARE(profileManager.rowCount({}), 1);
|
||||||
QCOMPARE(profileManager.numProfiles(), 1);
|
QCOMPARE(profileManager.numProfiles(), 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue