view _test/Test/Web/AutoLocator.pm @ 245:7c517134c42f

Added Unsupported media type Web exception corrected resourceLocation setting in the resource Implemented localizable resources for text messages fixed TT view scopings, INIT block in controls now sets globals correctly.
author sergey
date Mon, 29 Oct 2012 03:15:22 +0400
parents 5c82eec23bb6
children
line wrap: on
line source

package Test::Web::AutoLocator;
use strict;

use IMPL::Test qw(test assert);
use URI();

use IMPL::declare {
	require => {
		'Locator' => 'IMPL::Web::AutoLocator'
	},
	base => {
		'IMPL::Test::Unit' => '@_'
	}
};

test TestCreation => sub {
	my $location = Locator->new(base => 'http://bugs.company.org', view => "cgi");
	
	my $url = $location->show_bug({id => 100});
	assert( $url->url eq "http://bugs.company.org/show_bug.cgi?id=100", $url->url );
	
	$url = $location->SetView(undef)->help->CreateBug->HowTo;
	assert( $url->url eq "http://bugs.company.org/help/CreateBug/HowTo", $url->url );
};

1;