[Rt-commit] [svn] r926 - in RT-Client: . lib/RT t
autrijus at pallas.eruditorum.org
autrijus at pallas.eruditorum.org
Wed May 19 00:39:47 EDT 2004
Author: autrijus
Date: Wed May 19 00:39:47 2004
New Revision: 926
Modified:
RT-Client/ (props changed)
RT-Client/META.yml
RT-Client/Makefile.PL
RT-Client/lib/RT/Client.pm
RT-Client/t/1-procedural.t
Log:
----------------------------------------------------------------------
r4976 at not: autrijus | 2004-05-19T04:13:06.422037Z
* add URI to deps.
----------------------------------------------------------------------
r4977 at not: autrijus | 2004-05-19T04:23:47.488190Z
* Removed an unneccessary Get before Get/Set.
----------------------------------------------------------------------
r4980 at not: autrijus | 2004-05-19T04:32:21.386499Z
* The TODO test on transaction creator has now passed.
----------------------------------------------------------------------
Modified: RT-Client/META.yml
==============================================================================
--- RT-Client/META.yml (original)
+++ RT-Client/META.yml Wed May 19 00:39:47 2004
@@ -1,14 +1,16 @@
name: RT-Client
-version: 0.00_01
+version: 0.00_02
abstract: A client of RT from Best Practical Solutions
author: Autrijus Tang <autrijus at autrijus.org>
license: perl
distribution_type: module
requires:
+ XML::Simple: 0.01
XML::Atom: 0.07
- LWP::Authen::Wsse: 0.01
+ URI: 0
Spiffy: 0.16
- Filter::Include: 1.4
+ LWP::Authen::Wsse: 0
+ Digest::MD5: 0
no_index:
directory:
- inc
Modified: RT-Client/Makefile.PL
==============================================================================
--- RT-Client/Makefile.PL (original)
+++ RT-Client/Makefile.PL Wed May 19 00:39:47 2004
@@ -21,8 +21,10 @@
requires(qw(
XML::Simple 0.01
XML::Atom 0.07
- LWP::Authen::Wsse 0.01
+ URI 0
Spiffy 0.16
+ LWP::Authen::Wsse 0
+ Digest::MD5 0
));
include('ExtUtils::AutoInstall');
Modified: RT-Client/lib/RT/Client.pm
==============================================================================
--- RT-Client/lib/RT/Client.pm (original)
+++ RT-Client/lib/RT/Client.pm Wed May 19 00:39:47 2004
@@ -31,7 +31,7 @@
As the version number indicates, this is a very early proof-of-concept
release for peer review; all interfaces are subject to change, and
-it should not be used in production.
+should not be relied upon in production code.
=cut
@@ -76,7 +76,6 @@
my %args = (@_ % 2) ? (URI => @_) : @_;
if (my $uri = delete $args{URI}) {
- require URI;
$uri = URI->new($uri);
@args{'Username', 'Password'} = split(/:/, $uri->userinfo||'', 2);
$args{Server} = $uri->scheme . '://' .$uri->host_port;
@@ -170,8 +169,7 @@
=cut
sub get {
- my $res = $self->_request(@_, method => 'GET'); # XXX - ditch this asap
- $res = $self->_request(@_, method => 'GET') or return undef;
+ my $res = $self->_request(@_, method => 'GET') or return undef;
return $self->_spawn($res);
}
@@ -181,8 +179,7 @@
sub set {
splice(@_, 1, 0, 'content') if (@_ == 2 and $_[0] ne 'URI');
- my $res = $self->_request(@_, method => 'GET'); # XXX - ditch this asap
- $res = $self->_request(@_, method => 'PUT') or return undef;
+ my $res = $self->_request(@_, method => 'PUT') or return undef;
return $self->_spawn($res);
}
Modified: RT-Client/t/1-procedural.t
==============================================================================
--- RT-Client/t/1-procedural.t (original)
+++ RT-Client/t/1-procedural.t Wed May 19 00:39:47 2004
@@ -13,7 +13,7 @@
get('http://localhost/?user=root&pass=password');
if (get('http://root:password@localhost/Atom/0.3/') =~ /<feed/) {
- plan tests => 64;
+ plan tests => 65;
}
else {
plan skip_all => 'Atom 0.3 not available on localhost';
@@ -152,11 +152,8 @@
$rt->current_user('RT_System');
is($rt->set("Tickets/$id.Status", 'resolved'), 'resolved', 'resolve a ticket');
-
-TODO: {
- local $TODO = '*-1.Creator did not redosearch on server side';
- is($rt->get("Tickets/$id/Transactions/*-1.Creator"), undef, "set by system (should be $sys_id)");
-}
+isnt($rt->get("Tickets/$id/Transactions.Count"), 1, "transactions happened");
+is($rt->get("Tickets/$id/Transactions/*-1.Creator"), $sys_id, "set by system");
$rt->current_user($rt->username);
# 3. General CLI Requirements
More information about the Rt-commit
mailing list