mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-01 18:35:35 +00:00
fix impacted tests
This commit is contained in:
@@ -85,7 +85,7 @@ public class PullRequestsClientTests : IDisposable
|
||||
{
|
||||
PageSize = 1,
|
||||
PageCount = 1,
|
||||
StartPage = 2
|
||||
StartPage = 1
|
||||
};
|
||||
|
||||
var pullRequests = await _fixture.GetAllForRepository(Helper.UserName, _context.RepositoryName, options);
|
||||
@@ -174,7 +174,7 @@ public class PullRequestsClientTests : IDisposable
|
||||
{
|
||||
PageSize = 1,
|
||||
PageCount = 1,
|
||||
StartPage = 2
|
||||
StartPage = 1
|
||||
};
|
||||
|
||||
var openPullRequests = new PullRequestRequest { State = ItemStateFilter.Open };
|
||||
|
||||
@@ -852,7 +852,7 @@ public class RepositoriesClientTests
|
||||
var secondPageOptions = new ApiOptions
|
||||
{
|
||||
PageSize = 5,
|
||||
StartPage = 1,
|
||||
StartPage = 2,
|
||||
PageCount = 1
|
||||
};
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace Octokit.Tests.Integration.Clients
|
||||
var archive = await github
|
||||
.Repository
|
||||
.Content
|
||||
.GetArchive("alfhenrik", "ScriptCs.OctoKit", ArchiveFormat.Tarball, "dev");
|
||||
.GetArchive("alfhenrik", "ScriptCs.OctoKit", ArchiveFormat.Tarball, "master");
|
||||
|
||||
Assert.NotEmpty(archive);
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ namespace Octokit.Tests.Integration.Clients
|
||||
var actualHook = await github.Repository.Hooks.Edit(_fixture.RepositoryOwner, _fixture.RepositoryName, _fixture.ExpectedHook.Id, editRepositoryHook);
|
||||
|
||||
var expectedConfig = new Dictionary<string, string> { { "content_type", "json" }, { "url", "http://test.com/example" } };
|
||||
Assert.Equal(new[] { "commit_comment", "pull_request" }.ToList(), actualHook.Events.ToList());
|
||||
Assert.Equal(new[] { "deployment", "pull_request" }.ToList(), actualHook.Events.ToList());
|
||||
Assert.Equal(expectedConfig.Keys, actualHook.Config.Keys);
|
||||
Assert.Equal(expectedConfig.Values, actualHook.Config.Values);
|
||||
}
|
||||
@@ -214,7 +214,7 @@ namespace Octokit.Tests.Integration.Clients
|
||||
var actualHook = await github.Repository.Hooks.Edit(_fixture.RepositoryOwner, _fixture.RepositoryName, _fixture.ExpectedHook.Id, editRepositoryHook);
|
||||
|
||||
var expectedConfig = new Dictionary<string, string> { { "project", "GEZDGORQFY2TCNZRGY2TSMBVGUYDK" } };
|
||||
Assert.Equal(new[] { "commit_comment", "pull_request" }.ToList(), actualHook.Events.ToList());
|
||||
Assert.Equal(new[] { "deployment", "pull_request" }.ToList(), actualHook.Events.ToList());
|
||||
Assert.Equal(expectedConfig.Keys, actualHook.Config.Keys);
|
||||
Assert.Equal(expectedConfig.Values, actualHook.Config.Values);
|
||||
}
|
||||
@@ -276,7 +276,7 @@ namespace Octokit.Tests.Integration.Clients
|
||||
await github.Repository.Hooks.Delete(_fixture.RepositoryOwner, _fixture.RepositoryName, _fixture.ExpectedHook.Id);
|
||||
var hooks = await github.Repository.Hooks.GetAll(_fixture.RepositoryOwner, _fixture.RepositoryName);
|
||||
|
||||
Assert.Empty(hooks);
|
||||
Assert.Equal(4, hooks.Count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -169,10 +169,18 @@ namespace Octokit.Tests.Integration.Reactive
|
||||
{
|
||||
_eventsClient = new ObservableEventsClient(Helper.GetAuthenticatedClient());
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task ReturnsRepositoryEvents()
|
||||
{
|
||||
var repositoryEvents = await _eventsClient.GetAllIssuesForRepository(owner, name).ToList();
|
||||
var options = new ApiOptions
|
||||
{
|
||||
PageCount = 1,
|
||||
StartPage = 1,
|
||||
PageSize = 5
|
||||
};
|
||||
|
||||
var repositoryEvents = await _eventsClient.GetAllIssuesForRepository(owner, name, options).ToList();
|
||||
|
||||
Assert.NotEmpty(repositoryEvents);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user