X-Git-Url: http://erislabs.net/gitweb/?p=liburi-template-perl.git;a=blobdiff_plain;f=t%2F10-basic.t;h=934d87da031c1959021f5f9a4f8b3a57ac3f6ff5;hp=28e85222f6d6f9e9ddd62fec028fef88798e83b9;hb=c4fd5064ccd0e0c568bec68ebe82f3daf6c235b6;hpb=917525490f5d8e583f4b53dcd2d792b9e6f42c88 diff --git a/t/10-basic.t b/t/10-basic.t index 28e8522..934d87d 100644 --- a/t/10-basic.t +++ b/t/10-basic.t @@ -15,12 +15,8 @@ use_ok( 'URI::Template' ); my $text = 'http://foo.com/{bar}/{baz}?q=%7B'; my $template = URI::Template->new( $text ); isa_ok( $template, 'URI::Template' ); - is_deeply( - [ sort $template->variables ], - [ qw( bar baz ) ], - 'variables()' - ); - is( "$template", $text, 'as_string()' ); + is_deeply( [ sort $template->variables ], [ 'bar', 'baz' ], 'variables()' ); + is( "$template", $text, 'stringify' ); { my $result = $template->process( bar => 'x', baz => 'y' ); @@ -58,7 +54,7 @@ use_ok( 'URI::Template' ); { my $template = URI::Template->new( 'http://foo.com/{z}/{z}/' ); - is_deeply( [ $template->variables ], [ 'z' ], 'unique vars' ); + is_deeply( [ sort $template->variables ], [ 'z' ], 'no duplicates in variables()' ); my $result = $template->process( 'z' => 'x' ); is( $result, 'http://foo.com/x/x/', 'multiple replaces' ); }