Skip to content

Commit

Permalink
Updated requestsandboxtest to use the client request post method
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Sep 15, 2023
1 parent f685fd9 commit 3c97ebf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/IO.Ably.Tests.Shared/Rest/RequestSandBoxSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Net.Http;
using System.Threading.Tasks;
using FluentAssertions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using RichardSzalay.MockHttp;
using Xunit;
Expand Down Expand Up @@ -162,7 +163,7 @@ async Task ValidateMessages(string channelName, Action<Message, int> validate)
data = "foo",
}
};
var paginatedResponse = await client.Request(HttpMethod.Post, "/messages", null, JObject.FromObject(objectPayload), null);
var paginatedResponse = await client.Request(HttpMethod.Post, "/messages", null, JToken.FromObject(objectPayload), null);

ValidateResponse(paginatedResponse);

Expand All @@ -189,7 +190,7 @@ await ValidateMessages(channel, (message, messageIndex) =>
}
]
}";
paginatedResponse = await client.Request(HttpMethod.Post, "/messages", null, JObject.Parse(jsonPayload), null);
paginatedResponse = await client.Request(HttpMethod.Post.Method, "/messages", null, jsonPayload, null);

ValidateResponse(paginatedResponse, 5);

Expand Down

0 comments on commit 3c97ebf

Please sign in to comment.