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) : QObject(parent)
, _webSocketServer(new QWebSocketServer(QStringLiteral("Fake Server"), QWebSocketServer::NonSecureMode, this)) , _webSocketServer(new QWebSocketServer(QStringLiteral("Fake Server"), QWebSocketServer::NonSecureMode, this))
{ {
if (!_webSocketServer->listen(QHostAddress::Any, port)) { if (!_webSocketServer->listen(QHostAddress::LocalHost, port)) {
Q_UNREACHABLE(); Q_UNREACHABLE();
} }
connect(_webSocketServer, &QWebSocketServer::newConnection, this, &FakeWebSocketServer::onNewConnection); connect(_webSocketServer, &QWebSocketServer::newConnection, this, &FakeWebSocketServer::onNewConnection);

View file

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

View file

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