metatext/Mastodon/Sources/MastodonStubs/MastodonTarget+Stubbing.swift
Justin Mazzocchi 5f96f59ac3
wip
2020-08-31 03:21:01 -07:00

24 lines
556 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Mastodon
import Stubbing
extension APITarget: Stubbing {
public func stub(url: URL) -> HTTPStub? {
(endpoint as? Stubbing)?.stub(url: url)
}
public func data(url: URL) -> Data? {
(endpoint as? Stubbing)?.data(url: url)
}
public func dataString(url: URL) -> String? {
(endpoint as? Stubbing)?.dataString(url: url)
}
public func statusCode(url: URL) -> Int? {
(endpoint as? Stubbing)?.statusCode(url: url)
}
}