Skip to content

Commit

Permalink
Added tests for pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkeaveny committed Apr 6, 2022
1 parent 96a3546 commit 624e307
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,19 @@ public async Task VerifyTravisCIPullRequest(string pullRequestRef)
await VerifyPullRequestVersionIsCalculatedProperly(pullRequestRef, env);
}


[TestCaseSource(nameof(PrMergeRefs))]
public async Task VerifyBitBucketPipelinesPullRequest(string pullRequestRef)
{

var env = new Dictionary<string, string>
{
{ BitBucketPipelines.EnvironmentVariableName, "MyWorkspace" },
{ BitBucketPipelines.PullRequestEnvironmentVariableName, pullRequestRef }
};
await VerifyPullRequestVersionIsCalculatedProperly(pullRequestRef, env);
}

private static async Task VerifyPullRequestVersionIsCalculatedProperly(string pullRequestRef, Dictionary<string, string> env)
{
using var fixture = new EmptyRepositoryFixture();
Expand Down

0 comments on commit 624e307

Please sign in to comment.