public void Head_PullRequestNumberSet_HasCorrectValue() { Environment.SetEnvironmentVariable("GIT_BRANCH", "origin/pr/1234"); var git = new JenkinsGit(); git.Head.PullRequestId.Should().Be("1234"); }
public void Branch_EnvVariableSet_ParsesBranchFromRemote() { Environment.SetEnvironmentVariable("GIT_BRANCH", "origin/master"); var git = new JenkinsGit(); git.CurrentBranch.Should().Be("master"); }
public void Branch_EnvVariableSet_AssumesMasterOnPullRequest() { Environment.SetEnvironmentVariable("GIT_BRANCH", "origin/pr/1234/merge"); var git = new JenkinsGit(); git.CurrentBranch.Should().Be("master"); }
public void Branch_EnvVariableSet_PullsValue() { Environment.SetEnvironmentVariable("GIT_BRANCH", "master"); var git = new JenkinsGit(); git.CurrentBranch.Should().Be("master"); }