2 #===============================================================================
11 # AUTHOR: Chris Cormack (rangi), chrisc@catalyst.net.nz
12 # ORGANIZATION: Koha Development Team
14 # CREATED: 18/09/13 09:59:01
16 #===============================================================================
22 use Test::More tests => 7; # last test to print
27 ok( my $ncip = NCIP->new('t/config_sample'), 'Create new object' );
36 # handle_initiation is called as part of the process_request, but best to test
38 ok( !$ncip->handle_initiation($xmlbad), 'Bad xml' );
40 my $lookupitem = read_file('t/sample_data/LookupItem.xml');
42 ok( my $response = $ncip->process_request($lookupitem),
43 'Try looking up an item' );
44 is( $response, 'LookupItem', 'We got lookupitem' );
47 read_file('t/sample_data/LookupItemWithExampleItemIdentifierType.xml');
49 $response = $ncip->process_request($lookupitem),
50 'Try looking up an item, with agency'
52 is( $response, 'LookupItem', 'We got lookupitem with agency' );