diff --git a/test/raven-integration/Search/SearchOps.cs b/test/raven-integration/Search/SearchOps.cs index 9ec6b68a..67408a1d 100644 --- a/test/raven-integration/Search/SearchOps.cs +++ b/test/raven-integration/Search/SearchOps.cs @@ -108,11 +108,11 @@ namespace raven_integration } //Ensure the expected items are returned - MatchingIdList.Should().Contain(MatchWidgetInNotesId, "ShouldContainFirstWidget"); - MatchingIdList.Should().Contain(MatchWidgetInNameId, "ShouldContainSecondWidget"); - MatchingIdList.Should().Contain(MatchUserInNotesId, "ShouldContainUserNotesMatch"); - MatchingIdList.Should().Contain(MatchUserInNameId, "ShouldContainUserNameMatch"); - MatchingIdList.Should().NotContain(MatchNothingWidgetId, "ShouldNotContainThirdWidget"); + MatchingIdList.Should().Contain(MatchWidgetInNotesId, "ShouldContainMatchWidgetInNotesId"); + MatchingIdList.Should().Contain(MatchWidgetInNameId, "ShouldContainMatchWidgetInNameId"); + MatchingIdList.Should().Contain(MatchUserInNotesId, "ShouldContainMatchUserInNotesId"); + MatchingIdList.Should().Contain(MatchUserInNameId, "ShouldContainMatchUserInNameId"); + MatchingIdList.Should().NotContain(MatchNothingWidgetId, "ShouldNotContainMatchNothingWidgetId"); //Assert the order (roughly, this is kind of a waste of time, either the code is sorting or not, it's not going to change) //first item must be a widget @@ -145,7 +145,16 @@ namespace raven_integration Util.ValidateDataReturnResponseOk(a); ((JArray)a.ObjectResponse["result"]).Count.Should().BeGreaterOrEqualTo(2); //Check that list does *not* include the notes only records - + MatchingIdList = new List(); + foreach (JObject j in v) + { + MatchingIdList.Add(j["id"].Value()); + } + MatchingIdList.Should().NotContain(MatchWidgetInNotesId, "ShouldNotContainMatchWidgetInNotesId"); + MatchingIdList.Should().Contain(MatchWidgetInNameId, "ShouldContainMatchWidgetInNameId"); + MatchingIdList.Should().NotContain(MatchUserInNotesId, "ShouldContainMatchUserInNotesId"); + MatchingIdList.Should().Contain(MatchUserInNameId, "ShouldContainMatchUserInNameId"); + MatchingIdList.Should().NotContain(MatchNothingWidgetId, "ShouldNotContainThirdWidget"); }//eot