File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Limenet \LaravelElasticaBridge \Tests \Feature ;
4
4
5
+ use Elastica \Query \MatchQuery ;
6
+ use Limenet \LaravelElasticaBridge \Index \IndexInterface ;
7
+
5
8
class CommandTest extends TestCase
6
9
{
7
10
/** @test */
@@ -25,4 +28,12 @@ public function index_command_switches_blue_green()
25
28
$ this ->index ($ this ->productIndex );
26
29
$ this ->assertNotSame ($ activeOld , $ this ->productIndex ->getBlueGreenActiveElasticaIndex ()->getName ());
27
30
}
31
+ /** @test */
32
+ public function index_command_respects_should_index ()
33
+ {
34
+ $ this ->index ($ this ->customerIndex );
35
+
36
+ $ this ->assertCount (0 , $ this ->customerIndex ->searchForElements (new MatchQuery (IndexInterface::DOCUMENT_MODEL_ID , 1 )));
37
+ $ this ->assertCount (1 , $ this ->customerIndex ->searchForElements (new MatchQuery (IndexInterface::DOCUMENT_MODEL_ID , 2 )));
38
+ }
28
39
}
You can’t perform that action at this time.
0 commit comments