Skip to content

Commit 39ac91c

Browse files
committed
Fix unit tests
1 parent 20c3c2a commit 39ac91c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/GitVersion.Core.Tests/IntegrationTests/HotfixBranchScenarios.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ public void CanTakeVersionFromHotfixesBranch()
5353
r.MakeATaggedCommit("2.0.0");
5454
});
5555
// Merge hotfix branch to support
56-
Commands.Checkout(fixture.Repository, MainBranch);
57-
Commands.Checkout(fixture.Repository, fixture.Repository.CreateBranch("support-1.1", (LibGit2Sharp.Commit)fixture.Repository.Tags.Single(t => t.FriendlyName == "1.1.0").Target));
56+
var branch = fixture.Repository.CreateBranch(
57+
"support-1.1", (LibGit2Sharp.Commit)fixture.Repository.Tags.Single(t => t.FriendlyName == "1.1.0").Target
58+
);
59+
Commands.Checkout(fixture.Repository, branch);
5860
fixture.AssertFullSemver("1.1.0");
5961

6062
// create hotfix branch
6163
Commands.Checkout(fixture.Repository, fixture.Repository.CreateBranch("hotfixes/1.1.1"));
62-
fixture.AssertFullSemver("1.1.1+0");
64+
fixture.AssertFullSemver("1.1.1-beta.1+0");
6365
fixture.Repository.MakeACommit();
6466

6567
fixture.AssertFullSemver("1.1.1-beta.1+1");
@@ -85,7 +87,7 @@ public void PatchOlderReleaseExample()
8587

8688
// create hotfix branch
8789
fixture.BranchTo("hotfix-1.1.1");
88-
fixture.AssertFullSemver("1.1.1+0");
90+
fixture.AssertFullSemver("1.1.1-beta.1+0");
8991
fixture.MakeACommit();
9092

9193
fixture.AssertFullSemver("1.1.1-beta.1+1");

0 commit comments

Comments
 (0)