From 2a3e88bf96030e8584647055ee113af9fa3c548d Mon Sep 17 00:00:00 2001 From: Zorg Date: Fri, 19 Feb 2016 11:45:54 -0500 Subject: [PATCH] Test the dateString field --- Tests/Resources/testappcast.xml | 2 -- Tests/SUAppcastTest.swift | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Tests/Resources/testappcast.xml b/Tests/Resources/testappcast.xml index b88eb16b..18a256ac 100644 --- a/Tests/Resources/testappcast.xml +++ b/Tests/Resources/testappcast.xml @@ -11,7 +11,6 @@ Version 3.0 - Sat, 26 Jul 2014 15:20:12 +0000 @@ -24,7 +23,6 @@ Version 5.0 - Sat, 26 Jul 2014 15:20:14 +0000 2.0.0 diff --git a/Tests/SUAppcastTest.swift b/Tests/SUAppcastTest.swift index 72d55639..097cf95b 100644 --- a/Tests/SUAppcastTest.swift +++ b/Tests/SUAppcastTest.swift @@ -24,16 +24,20 @@ class SUAppcastTest: XCTestCase { XCTAssertEqual("Version 2.0", items[0].title); XCTAssertEqual("desc", items[0].itemDescription); + XCTAssertEqual("Sat, 26 Jul 2014 15:20:11 +0000", items[0].dateString) // This is the best release matching our system version XCTAssertEqual("Version 3.0", items[1].title); XCTAssertNil(items[1].itemDescription); + XCTAssertNil(items[1].dateString) XCTAssertEqual("Version 4.0", items[2].title); XCTAssertNil(items[2].itemDescription); + XCTAssertEqual("Sat, 26 Jul 2014 15:20:13 +0000", items[2].dateString) XCTAssertEqual("Version 5.0", items[3].title); XCTAssertNil(items[3].itemDescription); + XCTAssertNil(items[3].dateString) let bestAppcastItem = SUBasicUpdateDriver.bestAppcastItemFromAppcastItems(items, withComparator: SUStandardVersionComparator.defaultComparator())