File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -793,4 +793,24 @@ public function testWhereDatesResults()
793
793
$ this ->assertTrue ($ cachedResults ->diffKeys ($ books )->isEmpty ());
794
794
$ this ->assertTrue ($ liveResults ->diffKeys ($ books )->isEmpty ());
795
795
}
796
+
797
+ public function testWhereNotInResults ()
798
+ {
799
+ $ books = (new Book )
800
+ ->whereNotIn ('id ' , [1 , 2 ])
801
+ ->get ();
802
+ $ key = sha1 ('genealabslaravelmodelcachingtestsfixturesbook-id_in_1_2 ' );
803
+ $ tags = [
804
+ 'genealabslaravelmodelcachingtestsfixturesbook ' ,
805
+ ];
806
+
807
+ $ cachedResults = cache ()->tags ($ tags )
808
+ ->get ($ key );
809
+ $ liveResults = (new UncachedAuthor )
810
+ ->whereNotIn ('id ' , [1 , 2 ])
811
+ ->get ();
812
+
813
+ $ this ->assertTrue ($ cachedResults ->diffKeys ($ books )->isEmpty ());
814
+ $ this ->assertTrue ($ liveResults ->diffKeys ($ books )->isEmpty ());
815
+ }
796
816
}
You can’t perform that action at this time.
0 commit comments