Skip to content

Commit

Permalink
fix impacted tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey committed Jun 14, 2016
1 parent 9e9ac8e commit bcda94b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public async Task ReturnsCorrectCountOfPullRequestsWithStart()
{
PageSize = 1,
PageCount = 1,
StartPage = 2
StartPage = 1
};

var pullRequests = await _fixture.GetAllForRepository(Helper.UserName, _context.RepositoryName, options);
Expand Down Expand Up @@ -174,7 +174,7 @@ public async Task ReturnsCorrectCountOfPullRequestsWithStartParameterized()
{
PageSize = 1,
PageCount = 1,
StartPage = 2
StartPage = 1
};

var openPullRequests = new PullRequestRequest { State = ItemStateFilter.Open };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ public async Task GetsPagesOfBranches()
var secondPageOptions = new ApiOptions
{
PageSize = 5,
StartPage = 1,
StartPage = 2,
PageCount = 1
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public async Task GetsArchiveForReleaseBranchAsTarball()
var archive = await github
.Repository
.Content
.GetArchive("alfhenrik", "ScriptCs.OctoKit", ArchiveFormat.Tarball, "dev");
.GetArchive("alfhenrik", "ScriptCs.OctoKit", ArchiveFormat.Tarball, "master");

Assert.NotEmpty(archive);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public async Task EditHookWithNoNewConfigRetainsTheOldConfig()
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);
}
Expand All @@ -214,7 +214,7 @@ public async Task EditHookWithNewInformation()
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);
}
Expand Down Expand Up @@ -276,7 +276,7 @@ public async Task DeleteCreatedWebHook()
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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,18 @@ public TheGetAllIssuesForRepositoryMethod()
{
_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);
}
Expand Down

0 comments on commit bcda94b

Please sign in to comment.