Deprecated 'collection' parameter in favor of 'cq' - fixes #92

Change-Id: I51f0197da3a182fc4d4cd35f12ccb88cce3f8833
diff --git a/t/query.t b/t/query.t
index 81c4ac8..4532167 100644
--- a/t/query.t
+++ b/t/query.t
@@ -220,9 +220,24 @@
 $t->get_ok('/?q=timeout')
   ->status_is(200)
   # ->text_like('noscript div.notify-warning', qr!Response time exceeded!)
+  ->element_exists("input#cq")
+  ->element_exists_not("input#cq[value]")
   ->text_is('#total-results', '> 4,274,841');
   ;
 
+# Query with collection
+$t->get_ok('/?q=baum&collection=availability+%3D+%2FCC-BY.*%2F')
+  ->status_is(200)
+  ->element_exists("input#cq[value='availability = /CC-BY.*/']")
+  ->text_is('#error','')
+  ;
+
+# Query with corpus query
+$t->get_ok('/?q=baum&cq=availability+%3D+%2FCC-BY.*%2F')
+  ->status_is(200)
+  ->element_exists("input#cq[value='availability = /CC-BY.*/']")
+  ->text_is('#error','')
+  ;
 
 done_testing;
 __END__