Skip to content

Commit 7c7a42a

Browse files
committed
Test to show the enum array bug
1 parent a6f2f63 commit 7c7a42a

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

+6
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ public void Array_InSingleItem()
9696
Assert.Equal(@"{""selector"":{""age"":{""$in"":[20]}}}", json);
9797
}
9898
[Fact]
99+
public void Array_InEnum()
100+
{
101+
var json = _rebels.Where(r => r.Species.In(new[] { Species.Human, Species.Droid })).ToString();
102+
Assert.Equal(@"{""selector"":{""species"":{""$in"":[0,1]}}}", json);
103+
}
104+
[Fact]
99105
public void Array_NotIn()
100106
{
101107
var json = _rebels.Where(r => !r.Age.In(new[] { 20, 30 })).ToString();

0 commit comments

Comments
 (0)