fix impacted tests

This commit is contained in:
Brendan Forster
2016-06-14 14:30:25 +10:00
parent 9e9ac8eab8
commit bcda94b8d9
5 changed files with 16 additions and 8 deletions
@@ -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);
}