first pass RT4 merge, RT#13852
[freeside.git] / rt / t / web / query_log.t
diff --git a/rt/t/web/query_log.t b/rt/t/web/query_log.t
new file mode 100644 (file)
index 0000000..e19f44d
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+use RT::Test tests => 9;
+
+RT->Config->Set(StatementLog => 1);
+
+my ($baseurl, $m) = RT::Test->started_ok;
+ok $m->login, 'logged in';
+
+my $root = RT::User->new($RT::SystemUser);
+$root->LoadByEmail('root@localhost');
+
+$m->get_ok("/Admin/Tools/Queries.html");
+$m->text_contains("/index.html", "we include info about a page we hit while logging in");
+$m->text_contains("Stack:", "stack traces");
+$m->text_like(qr{share/html/autohandler:\d+}, "stack trace includes mason components");
+$m->text_contains("SELECT * FROM Principals WHERE id = '".$root->id."'", "we interpolate bind params");
+