Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Sep 8, 2023
1 parent 0f21386 commit aa342b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Tests/RevenueCatUITests/Data/PackageVariablesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class PackageVariablesTests: TestCase {

func testSpanishRelativeDiscount() {
expect(TestData.weeklyPackage.localizedRelativeDiscount(nil, Self.spanish)).to(beNil())
expect(TestData.weeklyPackage.localizedRelativeDiscount(0.372, Self.english)) == "ahorra 37%"
expect(TestData.weeklyPackage.localizedRelativeDiscount(0.372, Self.spanish)) == "37% de descuento"
}

}
Expand Down
14 changes: 7 additions & 7 deletions Tests/RevenueCatUITests/LocalizationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -265,20 +265,20 @@ class DiscountSpanishLocalizationTests: BaseLocalizationTests {
override var locale: Locale { return .init(identifier: "es_ES") }

func testLocalization() throws {
verify(0, "Ahorra 0%")
verify(0.1, "Ahorra 10%")
verify(0.331, "Ahorra 33%")
verify(0.5, "Ahorra 50%")
verify(1, "Ahorra 100%")
verify(1.1, "Ahorra 110%")
verify(0, "0% de descuento")
verify(0.1, "10% de descuento")
verify(0.331, "33% de descuento")
verify(0.5, "50% de descuento")
verify(1, "100% de descuento")
verify(1.1, "110% de descuento")
}

}

@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
class DiscountOtherLanguageLocalizationTests: BaseLocalizationTests {

override var locale: Locale { return .init(identifier: "fr") }
override var locale: Locale { return .init(identifier: "ci") }

func testLocalizationDefaultsToEnglish() {
verify(1, "100% off")
Expand Down

0 comments on commit aa342b0

Please sign in to comment.