Correct test to actually test not-found case.

It was always going to pass no matter what the other way it was written.
This commit is contained in:
Bradley M. Kuhn 2015-12-13 12:32:36 -08:00
parent 4df468bb1b
commit b5954e391e

View file

@ -104,9 +104,9 @@ dies_ok { $sp->addEmailAddress($drapperId, 'drapper@ex@ample.org', 'work') }
# Verify that the addressType wasn't added when the Email address is invalid
# and the address type did not already exist.
my $val = $sp->dbh()->selectall_hashref("SELECT id FROM address_type WHERE name = 'work'", 'id');
$val = $sp->dbh()->selectall_hashref("SELECT id, name FROM address_type WHERE name = 'work'", 'name');
ok((not defined $val or not defined $val->{'id'}),
ok((not defined $val or not defined $val->{'name'}),
"addEmailAddress: type is not added with email address is bad");
my $drapperEmailId;