mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 12:18:16 +08:00
* #555 added some tests for this issue but struggling to replicate * #555 removed cmd=instance from service fabric code as someone who knows service fabric says its not needed I * #555 renamed test
This commit is contained in:
21
test/Ocelot.UnitTests/Request/DownstreamRequestTests.cs
Normal file
21
test/Ocelot.UnitTests/Request/DownstreamRequestTests.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using Ocelot.Request.Middleware;
|
||||
using Shouldly;
|
||||
using Xunit;
|
||||
|
||||
namespace Ocelot.UnitTests.Request
|
||||
{
|
||||
public class DownstreamRequestTests
|
||||
{
|
||||
[Fact]
|
||||
public void should_have_question_mark_with_question_mark_prefixed()
|
||||
{
|
||||
var httpRequestMessage = new HttpRequestMessage();
|
||||
httpRequestMessage.RequestUri = new Uri("https://example.com/a?b=c");
|
||||
var downstreamRequest = new DownstreamRequest(httpRequestMessage);
|
||||
var result = downstreamRequest.ToHttpRequestMessage();
|
||||
result.RequestUri.Query.ShouldBe("?b=c");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user