Example #1
0
        public void CanFetchWithMixedUpCasingForTfsServerUrl()
        {
            CloneRepoWithTwoCommits();
            AddNewCommitToFakeTfsServer();
            string tfsUrlInUpperCase = integrationHelper.TfsUrl.ToUpper();

            integrationHelper.ChangeConfigSetting("MyProject", "tfs-remote.default.url", tfsUrlInUpperCase);

            integrationHelper.RunIn("MyProject", "pull");

            Assert.Equal(3, integrationHelper.GetCommitCount("MyProject"));
        }
Example #2
0
 public void BootstrapWithNoRemotes()
 {
     h.SetupGitRepo("repo", g =>
     {
         g.Commit("A sample commit.");
     });
     h.RunIn("repo", "bootstrap");
     h.AssertNoRef("repo", "tfs/default");
 }
Example #3
0
        public void CanUseThatConfig()
        {
            h.SetupFake(r =>
            {
                r.Changeset(1, "Project created from template", DateTime.Parse("2012-01-01 12:12:12 -05:00"))
                .Change(TfsChangeType.Add, TfsItemType.Folder, "$/MyProject");
            });
            h.Run("init", "http://my-tfs.local/tfs", "$/MyProject", "MyProject");
            h.SetConfig("MyProject", "tfs-remote.default.autotag", "true");
            h.RunIn("MyProject", "fetch");
            var expectedSha = "f8b247c3298f4189c6c9ff701f147af6e1428f97";

            h.AssertRef("MyProject", "refs/remotes/tfs/default", expectedSha);
            h.AssertRef("MyProject", "refs/tags/tfs/default/C1", expectedSha);
        }