From cc39142fc77061312ce3ed31ce6b2fa0599ec5f9 Mon Sep 17 00:00:00 2001 From: djfiander Date: Sat, 16 Sep 2006 13:04:13 +0000 Subject: [PATCH] Test logging in with invalid username and invalid password --- t/00sc_status.t | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/t/00sc_status.t b/t/00sc_status.t index b9ba880..9a4f840 100644 --- a/t/00sc_status.t +++ b/t/00sc_status.t @@ -7,9 +7,19 @@ use strict; use warnings; -use SIPtest qw($datepat $login_test $sc_status_test); +use SIPtest qw($datepat $username $password $login_test $sc_status_test); -my @tests = ( $login_test, $sc_status_test ); +my $invalid_uname = { id => 'Invalid username', + msg => "9300CNinvalid$username|CO$password|CPThe floor|", + pat => qr/^940/, + fields => [], }; + +my $invalid_pwd = { id => 'Invalid username', + msg => "9300CN$username|COinvalid$password|CPThe floor|", + pat => qr/^940/, + fields => [], }; + +my @tests = ( $invalid_uname, $invalid_pwd, $login_test, $sc_status_test ); SIPtest::run_sip_tests(@tests); -- 2.11.0