Merge pull request #6596 from pyromaniac2k/master

Fix tests
This commit is contained in:
Matthieu Gallien 2024-04-22 16:08:38 +02:00 committed by GitHub
commit b7dd6ff748
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ FakeWebSocketServer::FakeWebSocketServer(quint16 port, QObject *parent)
: QObject(parent)
, _webSocketServer(new QWebSocketServer(QStringLiteral("Fake Server"), QWebSocketServer::NonSecureMode, this))
{
if (!_webSocketServer->listen(QHostAddress::Any, port)) {
if (!_webSocketServer->listen(QHostAddress::LocalHost, port)) {
Q_UNREACHABLE();
}
connect(_webSocketServer, &QWebSocketServer::newConnection, this, &FakeWebSocketServer::onNewConnection);

View File

@ -187,7 +187,7 @@ class TestSetUserStatusDialog : public QObject
private slots:
void testCtor_fetchStatusAndPredefinedStatuses()
{
const QDateTime currentDateTime(QDateTime::currentDateTime());
const QDateTime currentDateTime(QDateTime::currentDateTimeUtc());
const QString userStatusId("fake-id");
const QString userStatusMessage("Some status");

View File

@ -61,13 +61,13 @@ private slots:
FolderMan fm;
auto account = Account::create();
auto url = QUrl{"http://example.de"};
auto url = QUrl{"http://example.com"};
auto cred = new HttpCredentialsTest("testuser", "secret");
account->setCredentials(cred);
account->setUrl(url);
url.setUserName(cred->user());
auto newAccountState{AccountStatePtr{ new AccountState{account}}};
auto newAccountState{AccountStatePtr{ new FakeAccountState{account}}};
auto folderman = FolderMan::instance();
QCOMPARE(folderman, &fm);