Skip to content

Commit

Permalink
Also remove Decoders.swift because this should be part of the starter…
Browse files Browse the repository at this point in the history
… project

fix UnitTests
  • Loading branch information
swieland committed Apr 13, 2022
1 parent 3d22721 commit 01b2d44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
24 changes: 0 additions & 24 deletions Sources/Toolbox/Utilities/Decoders.swift

This file was deleted.

12 changes: 8 additions & 4 deletions Tests/ToolboxTests/ToolboxTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,17 @@ final class ToolboxTests: XCTestCase {

func testDates() {

let isoDateInPast = "2020-09-22T10:43:31.227Z"
let isoDateInPastYear = "2015-03-22T10:43:31.227Z"
let isoDateInPast = "2020-09-22T10:43:31Z"
let isoDateInPastYear = "2015-03-22T10:43:31Z"

let today = Date()

let datePast = Formatters.isoDateFormatter.date(from: isoDateInPast)!
let datePastYear = Formatters.isoDateFormatter.date(from: isoDateInPastYear)!
let isoDateFormatter = ISO8601DateFormatter()

print(isoDateFormatter.string(from: Date()))

let datePast = isoDateFormatter.date(from: isoDateInPast)!
let datePastYear = isoDateFormatter.date(from: isoDateInPastYear)!

XCTAssertFalse(datePast.isDateYesterday)
XCTAssertFalse(today.isDateTomorrow)
Expand Down

0 comments on commit 01b2d44

Please sign in to comment.