mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 19:26:51 +00:00
feat: Removing accept header previews (#2515)
This commit is contained in:
@@ -22,13 +22,14 @@ namespace Octokit.Tests.Http
|
||||
var getUri = new Uri("anything", UriKind.Relative);
|
||||
IApiResponse<object> response = new ApiResponse<object>(CreateResponse(HttpStatusCode.OK));
|
||||
var connection = Substitute.For<IConnection>();
|
||||
connection.Get<object>(Args.Uri, null, null).Returns(Task.FromResult(response));
|
||||
connection.Get<object>(Args.Uri, null).Returns(Task.FromResult(response));
|
||||
var apiConnection = new ApiConnection(connection);
|
||||
|
||||
var data = await apiConnection.Get<object>(getUri);
|
||||
|
||||
Assert.Same(response.Body, data);
|
||||
connection.Received().GetResponse<object>(getUri);
|
||||
var calls = connection.ReceivedCalls();
|
||||
connection.Received().Get<object>(getUri, null, null);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user