Skip to content

Commit

Permalink
Unbox array with formatter tests now check to see if array contents i…
Browse files Browse the repository at this point in the history
…s as expected
  • Loading branch information
mikezs committed Jun 29, 2016
1 parent c0e5f9e commit d6c338e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Tests/UnboxTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ class UnboxTests: XCTestCase {

let unboxed: AllowInvalidElementsModel = try Unbox(invalidValueDateArrayDictionary)

XCTAssertEqual(unboxed.dateArray.count, 1)

if let firstDate = unboxed.dateArray.first {
let calendar = NSCalendar.currentCalendar()
XCTAssertEqual(calendar.component(.Year, fromDate: firstDate), 2015)
Expand Down Expand Up @@ -347,6 +349,7 @@ class UnboxTests: XCTestCase {

let unboxed: AllowInvalidElementsModel = try Unbox(invalidDictionary)
XCTAssertNil(unboxed.date)
XCTAssertEqual(unboxed.dateArray?.count, 1)

let calendar = NSCalendar.currentCalendar()
if let firstDate = unboxed.dateArray?.first {
Expand Down

0 comments on commit d6c338e

Please sign in to comment.