mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Test the dateString field
This commit is contained in:
1 parent
004ac3f9ae
commit
2a3e88bf96
2 files changed
+4
-2
No files matched your search
@@ -11,7 +11,6 @@
|
||||
<!-- The best chosen release -->
|
||||
<item>
|
||||
<title>Version 3.0</title>
|
||||
<pubDate>Sat, 26 Jul 2014 15:20:12 +0000</pubDate>
|
||||
<enclosure url="http://0.0.0.0:1337/Sparkle_Test_App.zip" sparkle:version="3.0" />
|
||||
</item>
|
||||
<!-- A release testing minimumSystemVersion -->
|
||||
@@ -24,7 +23,6 @@
|
||||
<!-- A joke release testing maximumSystemVersion -->
|
||||
<item>
|
||||
<title>Version 5.0</title>
|
||||
<pubDate>Sat, 26 Jul 2014 15:20:14 +0000</pubDate>
|
||||
<enclosure url="http://0.0.0.0:1337/Sparkle_Test_App.zip" sparkle:version="5.0" />
|
||||
<sparkle:maximumSystemVersion>2.0.0</sparkle:maximumSystemVersion>
|
||||
</item>
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
Reference in new issue
Block a user