diff options
Diffstat (limited to 'tests/postgres_tests/test_array.py')
| -rw-r--r-- | tests/postgres_tests/test_array.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py index 69ae5f3cda..a11b60e261 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -216,6 +216,14 @@ class TestQuerying(PostgreSQLTestCase): self.objs[1:3] ) + def test_icontains(self): + # Using the __icontains lookup with ArrayField is inefficient. + instance = CharArrayModel.objects.create(field=['FoO']) + self.assertSequenceEqual( + CharArrayModel.objects.filter(field__icontains='foo'), + [instance] + ) + def test_contains_charfield(self): # Regression for #22907 self.assertSequenceEqual( |
