Fix broken build + uncover localization tests (#702)

* Move LocalizationCatalogTests out of Localization/

SPM is treating all the files under Localization as a resource as per the Package.swift, hence it’s not even building it

* Use a class object vs struct to fix build issue

* Explicitly check that the output is not a l10n key

* Remove skipped test
This commit is contained in:
Islam
2025-10-01 13:16:59 +02:00
committed by GitHub
parent 2ffa709cca
commit 3183703a63
3 changed files with 6 additions and 10 deletions
+5 -1
View File
@@ -22,6 +22,8 @@ final class LocationNotesManagerTests: XCTestCase {
XCTAssertEqual(manager.state, .noRelays)
XCTAssertTrue(manager.initialLoadComplete)
XCTAssertEqual(manager.errorMessage, String(localized: "location_notes.error.no_relays"))
// Make sure we're getting an actual translated value and not the localization key
XCTAssertNotEqual(manager.errorMessage, "location_notes.error.no_relays")
}
func testSendWhenNoRelaysSurfacesError() {
@@ -40,7 +42,9 @@ final class LocationNotesManagerTests: XCTestCase {
XCTAssertFalse(sendCalled)
XCTAssertEqual(manager.state, .noRelays)
XCTAssertEqual(manager.errorMessage, String(localized: "location_notes.error.no_relays"))
XCTAssertEqual(manager.errorMessage, String(localized: "location_notes.error.no_relays"))
// Make sure we're getting an actual translated value and not the localization key
XCTAssertNotEqual(manager.errorMessage, "location_notes.error.no_relays")
}
func testSubscribeUsesGeoRelaysAndAppendsNotes() {