From 50035bce0150f32632aeff2f8629c5d29d73ad15 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse <guillaume.rousse@renater.fr> Date: Thu, 6 Dec 2018 08:47:32 +0100 Subject: [PATCH] update expected results --- t/cgi.t | 41 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/t/cgi.t b/t/cgi.t index 9870a43..300060c 100755 --- a/t/cgi.t +++ b/t/cgi.t @@ -8,7 +8,7 @@ use File::Temp; use IPC::Run qw(run); use Test::More; -plan tests => 5; +plan tests => 4; my $log = File::Temp->new(UNLINK => $ENV{TEST_DEBUG} ? 0 : 1); diag("log file: $log") if $ENV{TEST_DEBUG}; @@ -20,7 +20,10 @@ templates_dir = templates templates_theme = edugain [federations] -edugain = t/edugain.xml +list = edugain + +[edugain] +metadata = t/edugain.xml [app] url = https://my.fqdn/accountmanager @@ -67,44 +70,18 @@ subtest "index page" => sub { ); like( $out, - qr{<a href="\?action=start" class="button">Get started</a>}, + qr{<a href="\?action=select_sp" class="button">Get started</a>}, 'start button' ); is($err, '', 'empty stderr'); }; -subtest "SP selection page, implicit federation selection" => sub { - - plan tests => 4; - - local $ENV{REQUEST_METHOD} = 'GET'; - local $ENV{QUERY_STRING} = 'action=start'; - - my ($out, $err, $rc) = run_executable('access-check-manager.cgi'); - like( - $out, - qr{^Content-Type: text/html; charset=utf8\r\n\r\n}m, - 'HTTP headers' - ); - like( - $out, - qr{<title>eduGAIN Access Check</title>}, - 'page title' - ); - like( - $out, - qr{<select id="entityid" name="entityid" class="required">}, - 'page content contains SP list' - ); - is($err, '', 'empty stderr'); -}; - -subtest "SP selection page, explicit federation selection" => sub { +subtest "SP selection page" => sub { plan tests => 4; local $ENV{REQUEST_METHOD} = 'GET'; - local $ENV{QUERY_STRING} = 'action=select_sp&federation=edugain'; + local $ENV{QUERY_STRING} = 'action=select_sp'; my ($out, $err, $rc) = run_executable('access-check-manager.cgi'); like( @@ -119,7 +96,7 @@ subtest "SP selection page, explicit federation selection" => sub { ); like( $out, - qr{<select id="entityid" name="entityid" class="required">}, + qr{<select id="edugain" name="edugain">}, 'page content contains SP list' ); is($err, '', 'empty stderr'); -- GitLab