Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Commit

Permalink
fixed for rizen#76 difference of API version
Browse files Browse the repository at this point in the history
  • Loading branch information
worthmine committed Jun 10, 2019
1 parent 5e7eb55 commit bd07665
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 8 additions & 0 deletions cpanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
requires 'perl', '5.012001';
requires 'JSON', '2.16';
requires 'Ouch', '0.0400';
requires 'LWP::Protocol::https', '6.06';

on 'test' => sub {
requires 'Test::More', '0.98';
};
4 changes: 2 additions & 2 deletions t/01_versioned_path.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ isa_ok($fb, 'Facebook::Graph');
my $sarah = $fb->query->find('sarahbownds');

is $sarah->object_name, 'sarahbownds', 'get the proper object name';
is $sarah->api_version, 'v2.8', 'get an api version';
is $sarah->generate_versioned_path('sarahbownds'), 'v2.8/sarahbownds', 'create a versioned api path';
is $sarah->api_version, 'v3.1', 'get an api version';
is $sarah->generate_versioned_path('sarahbownds'), 'v3.1/sarahbownds', 'create a versioned api path';

8 changes: 4 additions & 4 deletions t/04_picture.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ isa_ok($fb, 'Facebook::Graph');
my $sarah_pic = $fb->picture('sarahbownds');
isa_ok($sarah_pic, 'Facebook::Graph::Picture');

is($sarah_pic->uri_as_string, 'https://graph.facebook.com/v2.8/sarahbownds/picture', 'default pic');
is($sarah_pic->get_small->uri_as_string, 'https://graph.facebook.com/v2.8/sarahbownds/picture?type=small', 'small pic');
is($sarah_pic->get_large->uri_as_string, 'https://graph.facebook.com/v2.8/sarahbownds/picture?type=large', 'large pic');
is($sarah_pic->get_square->uri_as_string, 'https://graph.facebook.com/v2.8/sarahbownds/picture?type=square', 'square pic');
is($sarah_pic->uri_as_string, 'https://graph.facebook.com/v3.1/sarahbownds/picture', 'default pic');
is($sarah_pic->get_small->uri_as_string, 'https://graph.facebook.com/v3.1/sarahbownds/picture?type=small', 'small pic');
is($sarah_pic->get_large->uri_as_string, 'https://graph.facebook.com/v3.1/sarahbownds/picture?type=large', 'large pic');
is($sarah_pic->get_square->uri_as_string, 'https://graph.facebook.com/v3.1/sarahbownds/picture?type=square', 'square pic');

0 comments on commit bd07665

Please sign in to comment.