View | Details | Raw Unified | Return to bug 12782
Collapse All | Expand All

(-)a/t/db_dependent/XISBN.t (-9 / +22 lines)
Lines 53-71 $trial = C4::XISBN::_get_biblio_from_xisbn($isbn1); Link Here
53
is( $trial->{biblionumber},
53
is( $trial->{biblionumber},
54
    $biblionumber1, "Gets biblionumber like the previous test." );
54
    $biblionumber1, "Gets biblionumber like the previous test." );
55
55
56
## Test ThingISBN
56
$context->set_preference( 'ThingISBN', 1 );
57
$context->set_preference( 'ThingISBN', 1 );
57
$context->set_preference( 'XISBN', 0 );
58
$context->set_preference( 'XISBN', 0 );
58
my $results_thingisbn = C4::XISBN::get_xisbns($isbn1);
59
is( $results_thingisbn->[0]->{biblionumber},
60
    $biblionumber3,
61
    "Gets correct biblionumber from a book with a similar isbn using ThingISBN." );
62
59
60
my $results_thingisbn;
61
eval { $results_thingisbn = C4::XISBN::get_xisbns($isbn1); };
62
SKIP: {
63
    skip "Problem retrieving ThingISBN", 1
64
        unless $@ eq '';
65
    is( $results_thingisbn->[0]->{biblionumber},
66
        $biblionumber3,
67
        "Gets correct biblionumber from a book with a similar isbn using ThingISBN." );
68
}
69
70
## Test XISBN
63
$context->set_preference( 'ThingISBN', 0 );
71
$context->set_preference( 'ThingISBN', 0 );
64
$context->set_preference( 'XISBN', 1 );
72
$context->set_preference( 'XISBN', 1 );
65
my $results_xisbn = C4::XISBN::get_xisbns($isbn1);
73
66
is( $results_xisbn->[0]->{biblionumber},
74
my $results_xisbn;
67
    $biblionumber3,
75
eval { $results_xisbn = C4::XISBN::get_xisbns($isbn1); };
68
    "Gets correct biblionumber from a book with a similar isbn using XISBN." );
76
SKIP: {
77
    skip "Problem retrieving XISBN", 1
78
        unless $@ eq '';
79
    is( $results_xisbn->[0]->{biblionumber},
80
        $biblionumber3,
81
        "Gets correct biblionumber from a book with a similar isbn using XISBN." );
82
}
69
83
70
$dbh->rollback;
84
$dbh->rollback;
71
85
72
- 

Return to bug 12782