Example #1
0
            public void LoadGitCommitTemplate_real_filesystem()
            {
                using var helper = new GitModuleTestHelper();
                var manager = new CommitTemplateManager(() => helper.Module);

                const string content = "line1\r\nline2\rline3\nline4";

                helper.Module.SetSetting("commit.template", "template.txt");
                helper.CreateRepoFile("template.txt", content);

                var body = manager.LoadGitCommitTemplate();

                body.Should().Be(content);
            }
        public void LoadGitCommitTemplate_commit_template_not_defined(string template)
        {
            _module.GetEffectiveSetting("commit.template").Returns(template);

            _manager.LoadGitCommitTemplate().Should().BeNull();
        }