| 1 |
use Test::More tests => 10; |
| 2 |
use strict; |
| 3 |
use lib 't'; |
| 4 |
|
| 5 |
use_ok('Test::Qpsmtpd'); |
| 6 |
|
| 7 |
ok(my ($smtpd, $conn) = Test::Qpsmtpd->new_conn(), "get new connection"); |
| 8 |
is(($smtpd->command('EHLO localhost'))[0], 250, 'EHLO localhost'); |
| 9 |
|
| 10 |
is(($smtpd->command('MAIL FROM:<[email protected]>'))[0], |
| 11 |
250, 'MAIL FROM:<[email protected]>'); |
| 12 |
is($smtpd->transaction->sender->address, '[email protected]', |
| 13 |
'got the right sender'); |
| 14 |
is(($smtpd->command('RSET'))[0], 250, 'RSET'); |
| 15 |
is($smtpd->transaction->sender, undef, 'No sender stored after rset'); |