Skip to content

Commit b76bca9

Browse files
committed
Add test to validate obsolete config settings
1 parent 2e21cb6 commit b76bca9

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
@@ -308,4 +308,23 @@ string SetupConfigFileContent(string text, string fileName, string path)
308308

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

0 commit comments

Comments
 (0)