Permalink
Browse files

remove xt/ directory

  • Loading branch information...
1 parent f32a75f commit bb3fee14b3090e7d1578f07adc71b79c9ffd92aa @ruz ruz committed Feb 7, 2013
Showing with 1 addition and 103 deletions.
  1. +1 −3 Makefile.PL
  2. +0 −30 xt/00.load.t
  3. +0 −6 xt/pod-coverage.t
  4. +0 −6 xt/pod.t
  5. +0 −58 xt/utils.pl
View
@@ -25,10 +25,8 @@ substitute(
RT_BIN_PATH => $bin_path,
RT_SBIN_PATH => $sbin_path,
},
- qw(xt/utils.pl lib/RT/Extension/CommandByMail/Test.pm),
+ qw(lib/RT/Extension/CommandByMail/Test.pm),
);
-author_tests('xt');
-
sign;
WriteAll();
View
@@ -1,30 +0,0 @@
-use Test::More tests => 5;
-
-BEGIN { require 'xt/utils.pl' }
-BEGIN {
- use_ok( 'RT' );
- RT::LoadConfig();
- use_ok( 'RT::Extension::CommandByMail' );
- use_ok( 'RT::Interface::Email::Filter::TakeAction' );
-}
-
-diag( "Testing RT::Extension::CommandByMail $RT::Extension::CommandByMail::VERSION" );
-
-my $new_config = RT->can('Config') && RT->Config->can('Get');
-
-my @plugins = $new_config
- ? RT->Config->Get('Plugins')
- : @RT::Plugins;
-
-my @mail_plugins = $new_config
- ? RT->Config->Get('MailPlugins')
- : @RT::MailPlugins;
-
-my $complain = 0;
-ok((grep { $_ eq 'RT::Extension::CommandByMail' } @plugins), "RT::Extension::CommandByMail is in your config's \@Plugins") or $complain = 1;
-ok((grep { $_ eq 'Filter::TakeAction' } @mail_plugins), "Filter::TakeAction is in your config's \@MailPlugins") or $complain = 1;
-
-if ($complain) {
- diag "Please read through the entire INSTALL documentation for directions on how to set up your config for testing and using this plugin.";
-}
-
View
@@ -1,6 +0,0 @@
-#!perl -T
-
-use Test::More;
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
-all_pod_coverage_ok();
View
@@ -1,6 +0,0 @@
-#!perl -T
-
-use Test::More;
-eval "use Test::Pod 1.14";
-plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
-all_pod_files_ok();
View
@@ -1,58 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-
-BEGIN {
-### after: push @INC, qw(@RT_LIB_PATH@);
- push @INC, qw(/opt/rt3/local/lib /opt/rt3/lib);
-}
-
-use RT;
-RT::LoadConfig();
-
-use IPC::Open2;
-
-### after: our $mailgate = '@RT_BIN_PATH@/rt-mailgate';
-our $mailgate = '/opt/rt3/bin/rt-mailgate';
-die "Couldn't find mailgate ($mailgate) command" unless -f $mailgate;
-
-$mailgate .= ' --debug';
-$mailgate .= ' --url '. $RT::WebURL;
-
-
-sub run_gate {
- my %args = (
- message => '',
- action => 'correspond',
- queue => 'General',
- @_
- );
- my $cmd = $mailgate
- ." --queue '$args{'queue'}'"
- ." --action $args{'action'}"
- ." 2>&1";
-
- DBIx::SearchBuilder::Record::Cachable->FlushCache;
-
- my ($child_out, $child_in);
- my $pid = open2($child_out, $child_in, $cmd);
- print $child_in $args{'message'};
- close $child_in;
- my $result = do { local $/; <$child_out> };
- return $result;
-}
-
-sub create_ticket_via_gate {
- my $message = shift;
- my $gate_result = run_gate( message => $message );
- $gate_result =~ /Ticket: (\d+)/;
- unless ( $1 ) {
- print STDERR "Couldn't find ticket id in text:\n$gate_result";
- }
- return $1;
-}
-
-1;
-

0 comments on commit bb3fee1

Please sign in to comment.