Skip to content

Commit 624e307

Browse files
committed
Added tests for pull requests
1 parent 96a3546 commit 624e307

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,19 @@ public async Task VerifyTravisCIPullRequest(string pullRequestRef)
128128
await VerifyPullRequestVersionIsCalculatedProperly(pullRequestRef, env);
129129
}
130130

131+
132+
[TestCaseSource(nameof(PrMergeRefs))]
133+
public async Task VerifyBitBucketPipelinesPullRequest(string pullRequestRef)
134+
{
135+
136+
var env = new Dictionary<string, string>
137+
{
138+
{ BitBucketPipelines.EnvironmentVariableName, "MyWorkspace" },
139+
{ BitBucketPipelines.PullRequestEnvironmentVariableName, pullRequestRef }
140+
};
141+
await VerifyPullRequestVersionIsCalculatedProperly(pullRequestRef, env);
142+
}
143+
131144
private static async Task VerifyPullRequestVersionIsCalculatedProperly(string pullRequestRef, Dictionary<string, string> env)
132145
{
133146
using var fixture = new EmptyRepositoryFixture();

0 commit comments

Comments
 (0)