Comparison

mod_lib_ldap/dev/t/02-vcard.t @ 827:e801edea846a

Compare decoded JPEG avatar data
author Rob Hoelz <rob@hoelz.ro>
date Tue, 18 Sep 2012 00:14:00 +0200
parent 825:abdc5db04152
child 828:855b28e10b39
comparison
equal deleted inserted replaced
826:9dc7d92f44e8 827:e801edea846a
2 use warnings; 2 use warnings;
3 use lib 't'; 3 use lib 't';
4 4
5 use TestConnection; 5 use TestConnection;
6 use AnyEvent::XMPP::Ext::VCard; 6 use AnyEvent::XMPP::Ext::VCard;
7 use MIME::Base64 qw(decode_base64);
7 use Test::More; 8 use Test::More;
8 9
9 sub test_vcard { 10 sub test_vcard {
10 my ( $username, $expected_fields ) = @_; 11 my ( $username, $expected_fields ) = @_;
11 12
64 my $photo_data = do { 65 my $photo_data = do {
65 local $/; 66 local $/;
66 my $data = <DATA>; 67 my $data = <DATA>;
67 chomp $data; 68 chomp $data;
68 69
69 $data 70 decode_base64($data)
70 }; 71 };
71 72
72 test_vcard(one => { 73 test_vcard(one => {
73 FN => 'John Testerson', 74 FN => 'John Testerson',
74 NICKNAME => 'one', 75 NICKNAME => 'one',