Skip to content
Permalink
Browse files

add tests for field restriction in active layer locator filter (#38692)

  • Loading branch information
3nids committed Sep 11, 2020
1 parent 14ef69f commit fdb8ff34cf8c0ee6d5f715a4e9f41c9e6ee75109
Showing with 9 additions and 0 deletions.
  1. +9 −0 tests/src/app/testqgsapplocatorfilters.cpp
@@ -180,6 +180,15 @@ void TestQgsAppLocatorFilters::testSearchActiveLayer()
results = gatherResults( &filter, QStringLiteral( "nice" ), context );
QCOMPARE( results.count(), 1 );

results = gatherResults( &filter, QStringLiteral( "@my_text nice" ), context );
QCOMPARE( results.count(), 1 );

results = gatherResults( &filter, QStringLiteral( "@my_integer nice" ), context );
QCOMPARE( results.count(), 0 );

results = gatherResults( &filter, QStringLiteral( "@unknown_field nice" ), context );
QCOMPARE( results.count(), 0 );

QgsProject::instance()->removeAllMapLayers();
}

0 comments on commit fdb8ff3

Please sign in to comment.
You can’t perform that action at this time.