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()
793793 $ this ->assertTrue ($ cachedResults ->diffKeys ($ books )->isEmpty ());
794794 $ this ->assertTrue ($ liveResults ->diffKeys ($ books )->isEmpty ());
795795 }
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+ }
796816}
You can’t perform that action at this time.
0 commit comments