The tests t/controller_NAME.t are automatically generated by the catalyst.pl script. They were not complete and individually dont have much function, so lets group them together in one file.gjungwirth/fix_tests
parent
18171eef96
commit
839f4cb5ab
@ -1,10 +0,0 @@
|
|||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More;
|
|
||||||
|
|
||||||
|
|
||||||
use Catalyst::Test 'NGCP::Panel';
|
|
||||||
use NGCP::Panel::Controller::Billing;
|
|
||||||
|
|
||||||
ok( request('/billing')->is_success || request('/billing')->is_redirect, 'Request should succeed' );
|
|
||||||
done_testing();
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More;
|
|
||||||
|
|
||||||
|
|
||||||
use Catalyst::Test 'NGCP::Panel';
|
|
||||||
use NGCP::Panel::Controller::Dashboard;
|
|
||||||
|
|
||||||
my $response = request('/dashboard');
|
|
||||||
|
|
||||||
ok( $response->is_success || $response->is_redirect , 'Request should succeed' );
|
|
||||||
done_testing();
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More;
|
|
||||||
|
|
||||||
|
|
||||||
use Catalyst::Test 'NGCP::Panel';
|
|
||||||
use NGCP::Panel::Controller::Login;
|
|
||||||
|
|
||||||
ok( request('/login')->is_success, 'Request should succeed' );
|
|
||||||
done_testing();
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More;
|
|
||||||
|
|
||||||
|
|
||||||
use Catalyst::Test 'NGCP::Panel';
|
|
||||||
use NGCP::Panel::Controller::NCOS;
|
|
||||||
|
|
||||||
ok( request('/ncos')->is_success || request('/ncos')->is_redirect, 'Request should succeed' );
|
|
||||||
done_testing();
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More;
|
|
||||||
|
|
||||||
|
|
||||||
use Catalyst::Test 'NGCP::Panel';
|
|
||||||
use NGCP::Panel::Controller::Peering;
|
|
||||||
|
|
||||||
ok( request('/peering')->is_success || request('/peering')->is_redirect, 'Request should succeed' );
|
|
||||||
done_testing();
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More;
|
|
||||||
|
|
||||||
|
|
||||||
use Catalyst::Test 'NGCP::Panel';
|
|
||||||
use NGCP::Panel::Controller::Sound;
|
|
||||||
|
|
||||||
ok( request('/sound')->is_success || request('/sound')->is_redirect, 'Request should succeed' );
|
|
||||||
done_testing();
|
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
use Sipwise::Base;
|
||||||
|
use Test::More;
|
||||||
|
|
||||||
|
BEGIN {
|
||||||
|
use_ok ('Catalyst::Test', 'NGCP::Panel');
|
||||||
|
use_ok 'NGCP::Panel::Controller::Administrator';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Billing';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Callflow';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Contact';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Contract';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Customer';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Dashboard';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Device';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Domain';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Login';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Logout';
|
||||||
|
use_ok 'NGCP::Panel::Controller::NCOS';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Peering';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Product';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Reseller';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Rewrite';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Root';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Security';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Sound';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Statistics';
|
||||||
|
use_ok 'NGCP::Panel::Controller::Subscriber';
|
||||||
|
}
|
||||||
|
|
||||||
|
my @controller_paths = ('/administrator','/billing','/callflow','/contact',
|
||||||
|
'/contract','/customer','/dashboard','/device','/domain','/logout',
|
||||||
|
'/ncos','/peering','/reseller','/rewrite','/security',
|
||||||
|
'/sound','/statistics','/subscriber');
|
||||||
|
for my $path (@controller_paths) {
|
||||||
|
ok(request($path)->is_redirect, "$path should redirect" );
|
||||||
|
}
|
||||||
|
|
||||||
|
ok( request('/login')->is_success, '/login should succeed' );
|
||||||
|
|
||||||
|
done_testing();
|
||||||
|
|
||||||
Loading…
Reference in new issue