Mark total results for cache in case of timeout - fixes #84
Change-Id: I7bad5a3c5df7332f5375c4027cffe67128a3b118
diff --git a/t/query.t b/t/query.t
index b1ae3bb..2ce7a90 100644
--- a/t/query.t
+++ b/t/query.t
@@ -209,6 +209,20 @@
->text_like('noscript div.notify-error', qr!Parameter ".+?" invalid!)
;
+# Query with timeout
+$t->get_ok('/?q=timeout')
+ ->status_is(200)
+ ->text_like('noscript div.notify-warn', qr!Response time exceeded!)
+ ->text_is('#total-results', '> 4,274,841');
+;
+
+# Do not cache
+$t->get_ok('/?q=timeout')
+ ->status_is(200)
+ # ->text_like('noscript div.notify-warning', qr!Response time exceeded!)
+ ->text_is('#total-results', '> 4,274,841');
+ ;
+
done_testing;
__END__