diff --git a/t/cgi.t b/t/cgi.t
index 93433816cfead116dc770e1d63ccc9965924f428..cae99af46eb626cac66e181b43accd13b908a0d9 100755
--- a/t/cgi.t
+++ b/t/cgi.t
@@ -167,7 +167,7 @@ named_subtest "SP selection page" => sub {
     $t->get_ok('/step1')
       ->status_is(200)
       ->text_is('html head title' => 'eduGAIN Access Check', 'expected title')
-      ->element_exists('select[id=edugain][name=edugain]', 'SP list');
+      ->element_exists('select[id=all][name=all]', 'SP list');
 
     my $res = $t->tx()->res();
     html_ok($res) or diag_file($res, $test_dir);
@@ -191,7 +191,7 @@ named_subtest "email selection page, invalid entityid parameter" => sub {
     $t->get_ok('/step2' => form => {federation => 'edugain', entityid => 'foo'})
       ->status_is(200)
       ->text_is('html head title' => 'eduGAIN Access Check', 'expected title')
-      ->content_like(qr/Error:[\n\s]+format_entityid/, 'expected error message');
+      ->content_like(qr/Error:[\n\s]+invalid parameter 'entityid'/, 'expected error message');
 
     my $res = $t->tx()->res();
     html_ok($res) or diag_file($res, $test_dir);