Skip to content

Commit

Permalink
Tests for option info order
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed May 11, 2017
1 parent 791e540 commit b2b4a96
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Tests/KingfisherTests/KingfisherOptionsInfoTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,17 @@ class KingfisherOptionsInfoTests: XCTestCase {
XCTAssertTrue(options.keepCurrentImageWhileLoading)
XCTAssertTrue(options.onlyLoadFirstFrame)
}

func testOptionCouldBeOverwritten() {
var options: KingfisherOptionsInfo = [.downloadPriority(0.5), .onlyFromCache]
XCTAssertEqual(options.downloadPriority, 0.5)

options.append(.downloadPriority(0.8))
XCTAssertEqual(options.downloadPriority, 0.8)

options.append(.downloadPriority(1.0))
XCTAssertEqual(options.downloadPriority, 1.0)
}
}

class TestModifier: ImageDownloadRequestModifier {
Expand Down

0 comments on commit b2b4a96

Please sign in to comment.