Skip to content

Commit

Permalink
fixing stupid copy/paste bag
Browse files Browse the repository at this point in the history
  • Loading branch information
rafiki270 committed Feb 28, 2018
1 parent e424984 commit 03e10d7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Sources/VaporTestTools/Extensions/Requests/HTTPRequest+Make.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,52 +21,52 @@ extension TestableProperty where TestableType == HTTPRequest {
}

public static func get(uri: URI, headers: [String: String]? = nil) -> HTTPRequest {
let req = request(method: HTTPMethod.get, uri: uri, headers: headers)
let req = request(method: .get, uri: uri, headers: headers)
return req
}

public static func put(uri: URI, data: Data? = nil, headers: [String: String]? = nil) -> HTTPRequest {
let req = request(method: HTTPMethod.get, uri: uri, data: data, headers: headers)
let req = request(method: .put, uri: uri, data: data, headers: headers)
return req
}

public static func post(uri: URI, data: Data? = nil, headers: [String: String]? = nil) -> HTTPRequest {
let req = request(method: HTTPMethod.get, uri: uri, data: data, headers: headers)
let req = request(method: .post, uri: uri, data: data, headers: headers)
return req
}

public static func patch(uri: URI, data: Data? = nil, headers: [String: String]? = nil) -> HTTPRequest {
let req = request(method: HTTPMethod.get, uri: uri, data: data, headers: headers)
let req = request(method: .patch, uri: uri, data: data, headers: headers)
return req
}

public static func delete(uri: URI, headers: [String: String]? = nil) -> HTTPRequest {
let req = request(method: HTTPMethod.get, uri: uri, headers: headers)
let req = request(method: .delete, uri: uri, headers: headers)
return req
}

public static func response(get uri: URI, headers: [String: String]? = nil, with app: Application) -> Response {
let req = request(method: HTTPMethod.get, uri: uri, headers: headers)
let req = request(method: .get, uri: uri, headers: headers)
return app.testable.response(to: req)
}

public static func response(put uri: URI, data: Data? = nil, headers: [String: String]? = nil, with app: Application) -> Response {
let req = request(method: HTTPMethod.get, uri: uri, data: data, headers: headers)
let req = request(method: .put, uri: uri, data: data, headers: headers)
return app.testable.response(to: req)
}

public static func response(post uri: URI, data: Data? = nil, headers: [String: String]? = nil, with app: Application) -> Response {
let req = request(method: HTTPMethod.get, uri: uri, data: data, headers: headers)
let req = request(method: .post, uri: uri, data: data, headers: headers)
return app.testable.response(to: req)
}

public static func response(patch uri: URI, data: Data? = nil, headers: [String: String]? = nil, with app: Application) -> Response {
let req = request(method: HTTPMethod.get, uri: uri, data: data, headers: headers)
let req = request(method: .patch, uri: uri, data: data, headers: headers)
return app.testable.response(to: req)
}

public static func response(delete uri: URI, headers: [String: String]? = nil, with app: Application) -> Response {
let req = request(method: HTTPMethod.get, uri: uri, headers: headers)
let req = request(method: .delete, uri: uri, headers: headers)
return app.testable.response(to: req)
}

Expand Down

0 comments on commit 03e10d7

Please sign in to comment.