Skip to content

Commit

Permalink
Content type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyzimarev committed Apr 5, 2024
1 parent 51abdef commit ce369ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/RestSharp.Tests.Integrated/MultipartFormDataTests.cs
Expand Up @@ -185,7 +185,7 @@ public sealed class MultipartFormDataTests : IDisposable {
using var client = new RestClient(_server.Url!);

var request = new RestRequest(RequestBodyCapturer.Resource, Method.Post) {
AlwaysMultipartFormData = true
AlwaysMultipartFormData = true,
};
var capturer = _server.ConfigureBodyCapturer(Method.Post);

Expand All @@ -197,12 +197,12 @@ public sealed class MultipartFormDataTests : IDisposable {
await client.ExecuteAsync(request);

var expectedBody = new[] {
$"{KnownHeaders.ContentType}: {ContentType.Plain}",
$"{KnownHeaders.ContentDisposition}: form-data; name={multipartName}",
ContentTypeString,
$"{ContentDispositionString} name={multipartName}",
bodyData
};

var actual = capturer.Body!.Split('\r');
var actual = capturer.Body!.Replace("\n", string.Empty).Split('\r');
actual.Should().Contain(expectedBody);
}
}

0 comments on commit ce369ef

Please sign in to comment.