Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
17 lines (14 sloc)
507 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@testable import Vapor | |
@testable import App | |
class FBServiceMock: BotServiceProtocol, Service { | |
let FacebookAPIToken = Environment.get("FBAPITOKEN") | |
var responseMessage: String? | |
var response: HTTPResponse? | |
func sendFBMessage(_ req: Request, message: FBMessage, recipient: FBUserID) throws -> EventLoopFuture<Response> { | |
responseMessage = message.text | |
return req.future(req.response(http: response!)) | |
} | |
func isSignatureValid(for req: Request) throws -> Bool { | |
return true | |
} | |
} |