feat: Removing accept header previews (#2515)

This commit is contained in:
Chris Simpson
2022-08-01 15:37:23 +01:00
committed by GitHub
parent 840935a8d7
commit 2f7bd00dd6
138 changed files with 954 additions and 1659 deletions
@@ -65,7 +65,7 @@ namespace Octokit.Tests.Reactive
deployKeysClient.GetAll("user", "repo");
gitHubClient.Connection.Received(1).Get<List<DeployKey>>(
new Uri("repos/user/repo/keys", UriKind.Relative), Arg.Is<Dictionary<string, string>>(dictionary => dictionary.Count == 0), null);
new Uri("repos/user/repo/keys", UriKind.Relative), Arg.Is<Dictionary<string, string>>(dictionary => dictionary.Count == 0));
}
[Fact]
@@ -86,8 +86,7 @@ namespace Octokit.Tests.Reactive
deployKeysClient.GetAll("user", "repo", options);
gitHubClient.Connection.Received(1)
.Get<List<DeployKey>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2));
// StartPage is setted => only 1 option (StartPage) in dictionary
options = new ApiOptions
@@ -98,8 +97,7 @@ namespace Octokit.Tests.Reactive
deployKeysClient.GetAll("user", "repo", options);
gitHubClient.Connection.Received(1)
.Get<List<DeployKey>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1));
// PageCount is setted => none of options in dictionary
options = new ApiOptions
@@ -110,8 +108,7 @@ namespace Octokit.Tests.Reactive
deployKeysClient.GetAll("user", "repo", options);
gitHubClient.Connection.Received(1)
.Get<List<DeployKey>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 0),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 0));
}
[Fact]
@@ -132,8 +129,7 @@ namespace Octokit.Tests.Reactive
deployKeysClient.GetAll(1, options);
gitHubClient.Connection.Received(1)
.Get<List<DeployKey>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2));
// StartPage is setted => only 1 option (StartPage) in dictionary
options = new ApiOptions
@@ -144,8 +140,7 @@ namespace Octokit.Tests.Reactive
deployKeysClient.GetAll(1, options);
gitHubClient.Connection.Received(1)
.Get<List<DeployKey>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1));
// PageCount is setted => none of options in dictionary
options = new ApiOptions
@@ -156,8 +151,7 @@ namespace Octokit.Tests.Reactive
deployKeysClient.GetAll(1, options);
gitHubClient.Connection.Received(1)
.Get<List<DeployKey>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 0),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 0));
}
[Fact]