mirror of
https://github.com/jellyfin/jellyfin-desktop.git
synced 2026-10-26 16:45:24 +00:00
Fix SystemComponent unit tests (#1170)
Turns SystemComponent::extractBaseUrl() into a static method so that the unit tests pass when run locally.
This commit is contained in:
1 parent
56e8916285
commit
f057bca04a
2 files changed
+2
-3
No files matched your search
@@ -44,7 +44,7 @@ public:
|
||||
Q_INVOKABLE void cancelServerConnectivity();
|
||||
Q_SIGNAL void serverConnectivityResult(QString url, bool success, QString resolvedUrl);
|
||||
|
||||
QString extractBaseUrl(const QString& url);
|
||||
static QString extractBaseUrl(const QString& url);
|
||||
void resolveUrl(const QString& url, std::function<void(const QString&)> callback);
|
||||
|
||||
Q_INVOKABLE QString getUserAgent();
|
||||
|
||||
@@ -141,8 +141,7 @@ void TestSystemComponent::testExtractBaseUrl()
|
||||
QFETCH(QString, input);
|
||||
QFETCH(QString, expected);
|
||||
|
||||
SystemComponent* component = &SystemComponent::Get();
|
||||
QString result = component->extractBaseUrl(input);
|
||||
QString result = SystemComponent::extractBaseUrl(input);
|
||||
|
||||
QCOMPARE(result, expected);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user