Skip to content

Commit dda3bad

Browse files
committed
Add test to validate obsolete config settings
1 parent 1f3732b commit dda3bad

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

321321
return fullPath;
322322
}
323+
324+
[Test]
325+
public void WarnOnObsoleteIsDevelopBranchConfigurationSetting()
326+
{
327+
const string text = @"
328+
assembly-versioning-scheme: MajorMinorPatch
329+
branches:
330+
master:
331+
tag: beta
332+
is-develop: true";
333+
334+
OldConfigurationException exception = Should.Throw<OldConfigurationException>(() =>
335+
{
336+
LegacyConfigNotifier.Notify(new StringReader(text));
337+
});
338+
339+
var expecedMessage = string.Format("'is-develop' is deprecated, use 'track-release-branches' instead.");
340+
exception.Message.ShouldContain(expecedMessage);
341+
}
323342
}

0 commit comments

Comments
 (0)