[Rt-commit] r15873 - in rt/branches/3.999-DANGEROUS: . t/plugins t/plugins/RT-Extension-Test t/plugins/RT-Extension-Test/html t/plugins/RT-Extension-Test/html/NoAuth t/plugins/RT-Extension-Test/lib t/plugins/RT-Extension-Test/lib/RT t/plugins/RT-Extension-Test/lib/RT/Extension
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Sep 9 13:40:32 EDT 2008
Author: sunnavy
Date: Tue Sep 9 13:40:30 2008
New Revision: 15873
Added:
rt/branches/3.999-DANGEROUS/t/plugin.t
rt/branches/3.999-DANGEROUS/t/plugins/
rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/
rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/html/
rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/html/NoAuth/
rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/html/NoAuth/test.html
rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/lib/
rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/lib/RT/
rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/lib/RT/Extension/
rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/lib/RT/Extension/Test.pm
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
Log:
r16562 at sunnavys-mb: sunnavy | 2008-09-10 01:37:54 +0800
added a simple plugin test case
Added: rt/branches/3.999-DANGEROUS/t/plugin.t
==============================================================================
--- (empty file)
+++ rt/branches/3.999-DANGEROUS/t/plugin.t Tue Sep 9 13:40:30 2008
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More tests => 5;
+BEGIN {
+ use RT;
+ use lib $RT::LocalLibPath; # plugin need this path in @INC
+ RT->load_config;
+ $RT::LocalPluginPath = $RT::BASE_PATH . "/t/plugins";
+ RT->config->set( 'Plugins', 'RT::Extension::Test' );
+ ok( RT->plugins->[0]->name, 'RT-Extension-Test' );
+}
+
+use RT::Test;
+my ($baseurl, $agent) = RT::Test->started_ok;
+$agent->get_ok($baseurl);
+$agent->get_ok($baseurl . '/NoAuth/test.html');
+like( $agent->content, qr/testtest/ );
Added: rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/html/NoAuth/test.html
==============================================================================
--- (empty file)
+++ rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/html/NoAuth/test.html Tue Sep 9 13:40:30 2008
@@ -0,0 +1 @@
+testtest
Added: rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/lib/RT/Extension/Test.pm
==============================================================================
--- (empty file)
+++ rt/branches/3.999-DANGEROUS/t/plugins/RT-Extension-Test/lib/RT/Extension/Test.pm Tue Sep 9 13:40:30 2008
@@ -0,0 +1,8 @@
+use warnings;
+use strict;
+
+package RT::Extension::Test;
+
+our $VERSION = '0.1';
+
+1;
More information about the Rt-commit
mailing list