Skip to content

Commit d84b484

Browse files
committed
Fix code for Xcode6-beta7.
1 parent 7cd2738 commit d84b484

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

SwiftTaskTests/AlamofireTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class AlamofireTests: _TestCase
1919

2020
let task = Task<Progress, String, NSError> { (progress, fulfill, reject, configure) in
2121

22-
Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"])
22+
request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"])
2323
.response { (request, response, data, error) in
2424

2525
println(request)
@@ -56,7 +56,7 @@ class AlamofireTests: _TestCase
5656

5757
let dummyURLString = "http://xxx-swift-task.org/get"
5858

59-
Alamofire.request(.GET, dummyURLString, parameters: ["foo": "bar"])
59+
request(.GET, dummyURLString, parameters: ["foo": "bar"])
6060
.response { (request, response, data, error) in
6161

6262
println(request)
@@ -98,7 +98,7 @@ class AlamofireTests: _TestCase
9898
// define task
9999
let task = Task<Progress, String, NSError> { (progress, fulfill, reject, configure) in
100100

101-
Alamofire.download(.GET, "http://httpbin.org/stream/100", destination: Alamofire.Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask))
101+
download(.GET, "http://httpbin.org/stream/100", Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask))
102102

103103
.progress { (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) in
104104

@@ -151,7 +151,7 @@ class AlamofireTests: _TestCase
151151
nsProgress.becomeCurrentWithPendingUnitCount(50)
152152

153153
// NOTE: test with url which returns totalBytesExpectedToWrite != -1
154-
let download = Alamofire.download(.GET, "http://httpbin.org/bytes/1024", destination: Alamofire.Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask))
154+
download(.GET, "http://httpbin.org/bytes/1024", Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask))
155155

156156
.response { (request, response, data, error) in
157157

@@ -201,7 +201,7 @@ class AlamofireTests: _TestCase
201201

202202
let task = Task<Progress, String?, NSError> { (progress, fulfill, reject, configure) in
203203

204-
let download = Alamofire.download(.GET, "http://httpbin.org/stream/100", destination: Alamofire.Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask))
204+
let downloadRequst = download(.GET, "http://httpbin.org/stream/100", Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask))
205205

206206
.response { (request, response, data, error) in
207207

@@ -220,7 +220,7 @@ class AlamofireTests: _TestCase
220220

221221
// configure cancel for cleanup after reject or task.cancel()
222222
configure.cancel = {
223-
download.cancel()
223+
downloadRequst.cancel()
224224
return
225225
}
226226

Vendor/SwiftState

0 commit comments

Comments
 (0)