TWMC: Doc patch and useragent patch from rT
[catagits/Test-WWW-Mechanize-Catalyst.git] / t / useragent.t
diff --git a/t/useragent.t b/t/useragent.t
new file mode 100644 (file)
index 0000000..02b311b
--- /dev/null
@@ -0,0 +1,15 @@
+#!perl -T
+use strict;
+use warnings;
+use lib 'lib';
+use Encode qw();
+use Test::More tests => 2;
+use lib 't/lib';
+use Test::WWW::Mechanize::Catalyst 'Catty';
+
+my $root = "http://localhost";
+my $agent = 'TestAgent/1.0';
+my $m = Test::WWW::Mechanize::Catalyst->new(agent => $agent);
+
+$m->get_ok("$root/user_agent");
+$m->title_is($agent, "title is correct: $agent");