add unit tests to default ios test plan

This commit is contained in:
Satindar Dhillon
2023-01-25 09:28:27 -08:00
parent f4c501f42c
commit 8c9d8816c7
3 changed files with 38 additions and 3 deletions

View File

@ -34,6 +34,41 @@
"identifier" : "042F48D826DFD10E00BF98FC",
"name" : "UITests-iOS"
}
},
{
"target" : {
"containerPath" : "container:OmnivoreKit",
"identifier" : "AppTests",
"name" : "AppTests"
}
},
{
"target" : {
"containerPath" : "container:OmnivoreKit",
"identifier" : "ModelsTests",
"name" : "ModelsTests"
}
},
{
"target" : {
"containerPath" : "container:OmnivoreKit",
"identifier" : "ServicesTests",
"name" : "ServicesTests"
}
},
{
"target" : {
"containerPath" : "container:OmnivoreKit",
"identifier" : "UtilsTests",
"name" : "UtilsTests"
}
},
{
"target" : {
"containerPath" : "container:OmnivoreKit",
"identifier" : "ViewsTests",
"name" : "ViewsTests"
}
}
],
"version" : 1

View File

@ -87,7 +87,7 @@ private struct SnoozeIconButtonView: View {
}
}
private struct Snooze {
struct Snooze {
let until: Date
let icon: Image
let title: String

View File

@ -11,7 +11,7 @@ final class HomeFeedViewTests: XCTestCase {
func test_weekdayBefore8PM() {
let now = parse("2022-01-31T10:11:12-08:00")
let snoozes = HomeFeedView.snoozeValuesForDate(now: now)
let snoozes = Snooze.snoozeValuesForDate(now: now)
XCTAssertEqual(snoozes[0].until, parse("2022-01-31T20:00:00-08:00"))
XCTAssertEqual(snoozes[1].until, parse("2022-02-01T08:00:00-08:00"))
@ -21,7 +21,7 @@ final class HomeFeedViewTests: XCTestCase {
func test_weekdayAfter8PM() {
let now = parse("2022-01-31T20:11:12-08:00")
let snoozes = HomeFeedView.snoozeValuesForDate(now: now)
let snoozes = Snooze.snoozeValuesForDate(now: now)
XCTAssertEqual(snoozes[0].until, parse("2022-02-01T08:00:00-08:00"))
XCTAssertEqual(snoozes[1].until, parse("2022-02-01T20:00:00-08:00"))