1####################################################################### 2# ex: set ts=8 sw=4 et 3######################################################################### 4use Test::More tests => 4; 5use WWW::Facebook::API; 6use strict; 7use warnings; 8 9my $api = WWW::Facebook::API->new( app_path => 'test' ); 10 11{ 12 no warnings 'redefine'; 13 *WWW::Facebook::API::call = sub { shift; return [@_] }; 14} 15is_deeply $api->admin->get_allocation( 16 integration_point_name => 'notifications_per_day' ), 17 [ 'admin.getAllocation', integration_point_name => 'notifications_per_day'], 18 'get_allocation calls correctly'; 19 20is_deeply $api->admin->get_metrics( 21 start_time => 0, end_time => 0, period => 0, 22 metrics => '["active_users", "canvas_page_views"]' ), 23 [ 'admin.getMetrics', 24 start_time => 0, end_time => 0, period => 0, 25 metrics => '["active_users", "canvas_page_views"]' 26 ], 27 'get_metrics calls correctly'; 28 29is_deeply $api->admin->get_app_properties( 30 properties => ["application_name","callback_url"] ), 31 [ 'admin.getAppProperties', 32 properties => ["application_name","callback_url"] ], 33 'get_app_properties calls correctly'; 34 35is_deeply $api->admin->set_app_properties( ), 36 [ 'admin.setAppProperties' ], 37 'set_app_properties calls correctly'; 38