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 @@ -773,4 +773,24 @@ public function testWhereBetweenDatesResults()
773
773
$ this ->assertTrue ($ cachedResults ->diffKeys ($ books )->isEmpty ());
774
774
$ this ->assertTrue ($ liveResults ->diffKeys ($ books )->isEmpty ());
775
775
}
776
+
777
+ public function testWhereDatesResults ()
778
+ {
779
+ $ books = (new Book )
780
+ ->whereDate ('created_at ' , '>= ' , '2018-01-01 ' )
781
+ ->get ();
782
+ $ key = sha1 ('genealabslaravelmodelcachingtestsfixturesbook-created_at_>=_2018-01-01 ' );
783
+ $ tags = [
784
+ 'genealabslaravelmodelcachingtestsfixturesbook ' ,
785
+ ];
786
+
787
+ $ cachedResults = cache ()->tags ($ tags )
788
+ ->get ($ key );
789
+ $ liveResults = (new UncachedAuthor )
790
+ ->whereBetween ('price ' , [5 , 10 ])
791
+ ->get ();
792
+
793
+ $ this ->assertTrue ($ cachedResults ->diffKeys ($ books )->isEmpty ());
794
+ $ this ->assertTrue ($ liveResults ->diffKeys ($ books )->isEmpty ());
795
+ }
776
796
}
You can’t perform that action at this time.
0 commit comments