Lines 18-29
Link Here
|
18 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
18 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
|
|
21 |
|
21 |
use Test::More tests => 41; |
22 |
use Test::More tests => 41; |
22 |
|
23 |
|
|
|
24 |
use Koha::Database; |
25 |
|
23 |
BEGIN { |
26 |
BEGIN { |
24 |
use_ok('t::lib::TestBuilder'); |
27 |
use_ok('t::lib::TestBuilder'); |
25 |
} |
28 |
} |
26 |
|
29 |
|
|
|
30 |
my $schema = Koha::Database->new->schema; |
31 |
$schema->storage->txn_begin; |
27 |
|
32 |
|
28 |
my $builder = t::lib::TestBuilder->new(); |
33 |
my $builder = t::lib::TestBuilder->new(); |
29 |
|
34 |
|
Lines 251-253
$bookseller = $builder->build({
Link Here
|
251 |
delete $bookseller->{_fk}; |
256 |
delete $bookseller->{_fk}; |
252 |
$bookseller_from_db = $rs_aqbookseller->find($bookseller); |
257 |
$bookseller_from_db = $rs_aqbookseller->find($bookseller); |
253 |
is( $bookseller_from_db->in_storage, 1, 'build with only_fk = 0 stores the entry correctly' ); |
258 |
is( $bookseller_from_db->in_storage, 1, 'build with only_fk = 0 stores the entry correctly' ); |
|
|
259 |
|
260 |
$schema->storage->txn_rollback; |
261 |
|
262 |
1; |