Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Moar tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
calebd committed Nov 19, 2015
1 parent 1efe8f3 commit ebfac53
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Tests/AlexanderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,17 @@ final class AlexanderTests: XCTestCase {
XCTAssertEqual(decodedUsers[1].ID, users[1].ID)
XCTAssertEqual(decodedUsers[1].name, users[1].name)
}

func testURLHelpers() {
let JSON = Alexander.JSON(object: "https://www.hodinkee.com")
let URL = JSON.url
XCTAssertNotNil(URL)
XCTAssertEqual(URL, NSURL(string: "https://www.hodinkee.com"))
}

func testDateHelpers() {
let JSON = Alexander.JSON(object: 978307200)
XCTAssertEqual(JSON.timeInterval, NSDate(timeIntervalSinceReferenceDate: 0).timeIntervalSince1970)
XCTAssertEqual(JSON.date, NSDate(timeIntervalSinceReferenceDate: 0))
}
}

0 comments on commit ebfac53

Please sign in to comment.