Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub _has_email_tests {
- subtest '_has_email returns JSON::TRUE when true' => sub {
- my $api = HP::API::Twofactorauth->new();
- my $fake_token = UnitTest::FakeObject->new(
- get_email => 1
- );
- my $result = $api->_has_email('cust', $fake_token);
- cmp_deeply($result, JSON::true);
- };
- subtest '_has_email returns JSON::false when false' => sub {
- my $api = HP::API::Twofactorauth->new();
- my $fake_token = UnitTest::FakeObject->new(
- get_email => 0
- );
- my $result = $api->_has_email('cust', $fake_token);
- cmp_deeply($result, JSON::false);
- };
- }
Add Comment
Please, Sign In to add comment