metatext/MastodonAPI/Sources/MastodonAPIStubs/AccountEndpoint+Stubbing.swift
2020-09-03 18:55:46 -07:00

15 lines
438 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import MastodonAPI
import Stubbing
extension AccountEndpoint: Stubbing {
public func data(url: URL) -> Data? {
switch self {
case .verifyCredentials: return try? Data(contentsOf: Bundle.module.url(forResource: "account",
withExtension: "json")!)
}
}
}