Update of /cvsroot/openinteract/OpenInteract2/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29019/t
Modified Files:
url.t
Log Message:
don't escape or add contextualization to URLs passed to create() that begin with an 'http:'
Index: url.t
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/t/url.t,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** url.t 25 Nov 2004 03:51:43 -0000 1.13
--- url.t 27 Nov 2004 18:27:33 -0000 1.14
***************
*** 7,11 ****
require 'utils.pl';
use OpenInteract2::Context qw( CTX );
! use Test::More tests => 109;
initialize_context();
--- 7,11 ----
require 'utils.pl';
use OpenInteract2::Context qw( CTX );
! use Test::More tests => 112;
initialize_context();
***************
*** 324,328 ****
--- 324,346 ----
}
+ # Ensure absolute URL is not modified
+
+ {
+ CTX->assign_deploy_url( '/OpenInteract' );
+ my $url = 'http://www.my.server/foo/';
+ my $create_url = $UCL->create( $url );
+ is( $create_url, $url,
+ 'Absolute URL is not modified with create()' );
+ my %params = ( id => 55, undercover => 'yes' );
+ $create_url = $UCL->create( $url, \%params );
+ compare_urls( $url, \%params, $create_url,
+ 'Absolute URL not modified with create() but parameters added ok' );
+
+ }
+
+
+
{
+ CTX->assign_deploy_url( '/OpenInteract' );
my $url = '/OpenInteract/foo/bar';
my $strip_url = $UCL->strip_deployment_context( $url );
|