File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/GitVersionCore.Tests/IntegrationTests Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 2
2
using GitVersionCore . Tests ;
3
3
using LibGit2Sharp ;
4
4
using NUnit . Framework ;
5
+ using Shouldly ;
5
6
6
7
[ TestFixture ]
7
8
public class OtherBranchScenarios
@@ -20,6 +21,7 @@ public void CanTakeVersionFromReleaseBranch()
20
21
fixture . AssertFullSemver ( "2.0.0-alpha.1+0" ) ;
21
22
}
22
23
}
24
+
23
25
[ Test ]
24
26
public void BranchesWithIllegalCharsShouldNotBeUsedInVersionNames ( )
25
27
{
@@ -34,4 +36,25 @@ public void BranchesWithIllegalCharsShouldNotBeUsedInVersionNames()
34
36
fixture . AssertFullSemver ( "1.0.4-issue-m-github-569.1+5" ) ;
35
37
}
36
38
}
39
+
40
+ [ Test ]
41
+ public void ShouldNotGetVersionFromFeatureBranchIfNotMerged ( )
42
+ {
43
+ using ( var fixture = new EmptyRepositoryFixture ( ) )
44
+ {
45
+ fixture . Repository . MakeATaggedCommit ( "1.0.0-unstable.0" ) ; // initial commit in master
46
+
47
+ fixture . Repository . CreateBranch ( "feature" ) ;
48
+ fixture . Repository . Checkout ( "feature" ) ;
49
+ fixture . Repository . MakeATaggedCommit ( "1.0.1-feature.1" ) ;
50
+
51
+ fixture . Repository . Checkout ( "master" ) ;
52
+ fixture . Repository . CreateBranch ( "develop" ) ;
53
+ fixture . Repository . Checkout ( "develop" ) ;
54
+ fixture . Repository . MakeACommit ( ) ;
55
+
56
+ var version = fixture . GetVersion ( ) ;
57
+ version . SemVer . ShouldBe ( "1.0.0-unstable.1" ) ;
58
+ }
59
+ }
37
60
}
You can’t perform that action at this time.
0 commit comments