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

(-)a/t/db_dependent/AuthorisedValues.t (-8 / +9 lines)
Lines 1-12 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Test::More tests => 31;
4
use Test::More tests => 32;
5
5
6
use C4::Context;
6
use Koha::AuthorisedValue;
7
use Koha::AuthorisedValue;
7
use Koha::AuthorisedValues;
8
use Koha::AuthorisedValues;
8
9
9
use Data::Dumper; # FIXME REMOVEME
10
my $dbh = C4::Context->dbh;
11
$dbh->{AutoCommit} = 0;
12
$dbh->{RaiseError} = 1;
13
14
$dbh->do("DELETE FROM authorised_values");
10
15
11
# Tests for Koha::AuthorisedValue
16
# Tests for Koha::AuthorisedValue
12
17
Lines 146-154 $selected = shift @$selected; Link Here
146
is( $selected->{selected}, 1, 'av is selected' );
151
is( $selected->{selected}, 1, 'av is selected' );
147
is( $selected->{authorised_value}, 'value 5', 'av selected is "value 5"');
152
is( $selected->{authorised_value}, 'value 5', 'av selected is "value 5"');
148
153
154
is( $av1->delete, 1, "Delete 1 AV" );
149
155
150
$av1->delete;
156
$dbh->rollback;
151
$av2->delete;
152
$av3->delete;
153
$av4->delete;
154
$av5->delete;
155
- 

Return to bug 10363