예제 #1
0
        public void Head_PullRequestNumberSet_HasCorrectValue()
        {
            Environment.SetEnvironmentVariable("GIT_BRANCH", "origin/pr/1234");

            var git = new JenkinsGit();

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