metatext/Mastodon/Sources/MastodonStubs/ContextEndpoint+Stubbing.swift

20 lines
387 B
Swift
Raw Normal View History

2020-08-19 22:16:03 +00:00
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
2020-08-30 23:33:11 +00:00
import Mastodon
2020-08-31 10:21:01 +00:00
import Stubbing
2020-08-19 22:16:03 +00:00
extension ContextEndpoint: Stubbing {
2020-08-31 10:21:01 +00:00
public func dataString(url: URL) -> String? {
2020-08-19 22:16:03 +00:00
switch self {
case .context:
return """
{
"ancestors": [],
"descendants": []
}
"""
}
}
}