Files
octokit.net/Octokit.Tests.Integration/Helpers/ReferenceExtensionsTests.cs
Ryan Gribble b7ad64d92f Remove obsolete members (#1622)
* remove obsolete "Branches" methods from RepositoryClient (all were previuosly moved to RepositoryBranchesClient)

* Remove obsolete DeploymentStatus fields

* Remove obsoleteMergePullRequest.Squash parameter

* Remove obsolete request ctor

* Remove tests

* Not sure how I missed these test references
2017-06-27 08:50:31 +10:00

30 lines
1.0 KiB
C#

using Octokit.Helpers;
using System.Linq;
using System.Threading.Tasks;
using Xunit;
namespace Octokit.Tests.Integration.Helpers
{
public class ReferenceExtensionsTests
{
[IntegrationTest]
public async Task CreateABranch()
{
var client = Helper.GetAuthenticatedClient();
var fixture = client.Git.Reference;
using (var context = await client.CreateRepositoryContext("public-repo"))
{
var branchFromMaster = await fixture.CreateBranch(context.RepositoryOwner, context.RepositoryName, "patch-1");
var branchFromPath = await fixture.CreateBranch(context.RepositoryOwner, context.RepositoryName, "patch-2", branchFromMaster);
var allBranchNames = (await client.Repository.Branch.GetAll(context.RepositoryOwner, context.RepositoryName)).Select(b => b.Name);
Assert.Contains("patch-1", allBranchNames);
Assert.Contains("patch-2", allBranchNames);
}
}
}
}