Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Ref #4256: Update unit tests for the new dtoi param duration.
Browse files Browse the repository at this point in the history
  • Loading branch information
iccub committed Oct 5, 2021
1 parent 532625f commit 50e80d8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions BraveSharedTests/DAUTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,20 @@ class DAUTests: XCTestCase {
pingWithDateAndCompare(dateString: "2017-11-20", daily: true, weekly: true,
monthly: false, dtoi: dateString)

// Exact 14 days after install date
pingWithDateAndCompare(dateString: "2017-11-24", daily: true, weekly: false,
monthly: false, dtoi: dateString)
// Exact 30 days after install date
pingWithDateAndCompare(dateString: "2017-12-10", daily: true, weekly: true,
monthly: true, dtoi: dateString)

XCTAssertNotNil(Preferences.DAU.installationDate.value)

pingWithDateAndCompare(dateString: "2017-11-25", daily: true, weekly: false,
pingWithDateAndCompare(dateString: "2017-12-25", daily: true, weekly: true,
monthly: false, dtoi: "null")

// After 14 days installation date pref should be removed.
// After 30 days installation date pref should be removed.
XCTAssertNil(Preferences.DAU.installationDate.value)

pingWithDateAndCompare(dateString: "2017-12-20", daily: true, weekly: true,
monthly: true, dtoi: "null")
pingWithDateAndCompare(dateString: "2017-12-28", daily: true, weekly: false,
monthly: false, dtoi: "null")
}

func testDtoiParamExistingUser() {
Expand Down

0 comments on commit 50e80d8

Please sign in to comment.