mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-14 06:50:08 +00:00
Fix tests
This commit is contained in:
@@ -229,9 +229,15 @@ public class MessageTests(ITestOutputHelper testOutputHelper, TestFixture fixtur
|
||||
Client.Gateway.OnceGatewayMessage.Add(async payload => {
|
||||
if (payload is { Opcode: GatewayOpcode.S2CDispatch, DispatchEventType: "READY" }) {
|
||||
_testOutputHelper.WriteLine("Got ready: {0} {1} ({2} data keys)", payload.Opcode, payload.DispatchEventType, payload.EventData!.Count);
|
||||
await Channel.SendMessageAsync(new MessageSchema() {
|
||||
|
||||
});
|
||||
var mPayload = new JsonObject() {
|
||||
{ "content", "meow" }
|
||||
};
|
||||
|
||||
var reqContent = new MultipartFormDataContent();
|
||||
reqContent.Add(JsonContent.Create(mPayload), "payload_json");
|
||||
|
||||
var res = await Assert.HttpSuccess(await Client.ApiHttpClient.PostAsync($"channels/{Channel.Id}/messages", reqContent,
|
||||
cancellationToken: TestContext.Current.CancellationToken));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -130,9 +130,9 @@ public class SpacebarClientChannel(AuthenticatedSpacebarClient client, long chan
|
||||
return (await resp.Content.ReadFromJsonAsync<Channel>())!;
|
||||
}
|
||||
|
||||
public async Task SendMessageAsync(MessageSchema messageSchema) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
// public async Task SendMessageAsync(MessageSchema messageSchema) {
|
||||
// throw new NotImplementedException();
|
||||
// }
|
||||
}
|
||||
|
||||
public class SpacebarClientGuild(AuthenticatedSpacebarClient client, long guildId) {
|
||||
|
||||
Reference in New Issue
Block a user