Пример #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");
 }