Skip to content

Commit 3aec51c

Browse files
maxraabJakeGinnivan
authored andcommitted
Add test to validate obsolete config settings
1 parent 5d1e7aa commit 3aec51c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/GitVersionCore.Tests/ConfigProviderTests.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,23 @@ string SetupConfigFileContent(string text, string fileName, string path)
305305

306306
return fullPath;
307307
}
308+
309+
[Test]
310+
public void WarnOnObsoleteIsDevelopBranchConfigurationSetting()
311+
{
312+
const string text = @"
313+
assembly-versioning-scheme: MajorMinorPatch
314+
branches:
315+
master:
316+
tag: beta
317+
is-develop: true";
318+
319+
OldConfigurationException exception = Should.Throw<OldConfigurationException>(() =>
320+
{
321+
LegacyConfigNotifier.Notify(new StringReader(text));
322+
});
323+
324+
var expecedMessage = string.Format("'is-develop' is deprecated, use 'track-release-branches' instead.");
325+
exception.Message.ShouldContain(expecedMessage);
326+
}
308327
}

0 commit comments

Comments
 (0)