From 3c145c63f483d3336845fa70d6ff6574cf1bf92f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 11 Jan 2015 11:48:03 -0800 Subject: [PATCH] Fixing broken tests --- .../ParserTests/NormalizeTitleFixture.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs b/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs index 23a016305..d78914997 100644 --- a/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs @@ -35,7 +35,6 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("the")] [TestCase("and")] [TestCase("or")] - [TestCase("a")] [TestCase("an")] [TestCase("of")] public void should_remove_common_words(string word) @@ -57,6 +56,23 @@ namespace NzbDrone.Core.Test.ParserTests } } + [Test] + public void should_remove_a_from_middle_of_title() + { + var dirtyFormat = new[] + { + "word.{0}.word", + "word {0} word", + "word-{0}-word", + }; + + foreach (var s in dirtyFormat) + { + var dirty = String.Format(s, "a"); + dirty.CleanSeriesTitle().Should().Be("wordword"); + } + } + [TestCase("the")] [TestCase("and")] [TestCase("or")]