Skip to content

Commit 28dc310

Browse files
committed
Unit test proving bug handling In() for single item array
1 parent ec908ce commit 28dc310

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/CouchDB.Driver.UnitTests/Find/Find_Selector_Conditions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ public void Array_In()
8282
Assert.Equal(@"{""selector"":{""age"":{""$in"":[20,30]}}}", json);
8383
}
8484
[Fact]
85+
public void Array_InSingleItem()
86+
{
87+
var json = _rebels.Where(r => r.Age.In(new[] { 20 })).ToString();
88+
Assert.Equal(@"{""selector"":{""age"":{""$in"":[20]}}}", json);
89+
}
90+
[Fact]
8591
public void Array_NotIn()
8692
{
8793
var json = _rebels.Where(r => !r.Age.In(new[] { 20, 30 })).ToString();

0 commit comments

Comments
 (0)