Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
varjolintu committed Apr 2, 2021
1 parent 5c8072f commit 889f507
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions tests/TestBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void TestBrowser::testIncrementNonce()
/**
* Tests for BrowserService
*/
void TestBrowser::testBaseDomain()
void TestBrowser::testTopLevelDomain()
{
QString url1 = "https://another.example.co.uk";
QString url2 = "https://www.example.com";
Expand All @@ -117,12 +117,12 @@ void TestBrowser::testBaseDomain()
QString url5 = "https://192.168.0.1";
QString url6 = "https://192.168.0.1:8000";

QString res1 = Tools::getBaseDomainFromUrl(url1);
QString res2 = Tools::getBaseDomainFromUrl(url2);
QString res3 = Tools::getBaseDomainFromUrl(url3);
QString res4 = Tools::getBaseDomainFromUrl(url4);
QString res5 = Tools::getBaseDomainFromUrl(url5);
QString res6 = Tools::getBaseDomainFromUrl(url6);
QString res1 = m_browserService->getTopLevelDomainFromUrl(url1);
QString res2 = m_browserService->getTopLevelDomainFromUrl(url2);
QString res3 = m_browserService->getTopLevelDomainFromUrl(url3);
QString res4 = m_browserService->getTopLevelDomainFromUrl(url4);
QString res5 = m_browserService->getTopLevelDomainFromUrl(url5);
QString res6 = m_browserService->getTopLevelDomainFromUrl(url6);

QCOMPARE(res1, QString("example.co.uk"));
QCOMPARE(res2, QString("example.com"));
Expand Down
2 changes: 1 addition & 1 deletion tests/TestBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private slots:
void testDecryptMessage();
void testGetBase64FromKey();
void testIncrementNonce();
void testBaseDomain();
void testTopLevelDomain();
void testSortPriority();
void testSortPriority_data();
void testSearchEntries();
Expand Down

0 comments on commit 889f507

Please sign in to comment.