Bugzilla – Attachment 148452 Details for
Bug 33103
Add vendor aliases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33103: Add tests for Aliases Koha classes
Bug-33103-Add-tests-for-Aliases-Koha-classes.patch (text/plain), 1.45 KB, created by
Jonathan Druart
on 2023-03-21 13:11:27 UTC
(
hide
)
Description:
Bug 33103: Add tests for Aliases Koha classes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-03-21 13:11:27 UTC
Size:
1.45 KB
patch
obsolete
>From 5c6587c6722d0e8cc2bc9a6ea494b21e8ed3dae8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 2 Mar 2023 13:54:37 +0100 >Subject: [PATCH] Bug 33103: Add tests for Aliases Koha classes > >Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> >--- > t/db_dependent/Koha/Acquisition/Booksellers.t | 22 ++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Acquisition/Booksellers.t b/t/db_dependent/Koha/Acquisition/Booksellers.t >index abd4e2ff457..1b6a5d4e1c0 100755 >--- a/t/db_dependent/Koha/Acquisition/Booksellers.t >+++ b/t/db_dependent/Koha/Acquisition/Booksellers.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 3; >+use Test::More tests => 4; > > use t::lib::TestBuilder; > >@@ -172,3 +172,23 @@ subtest '->contacts() tests' => sub { > > $schema->storage->txn_rollback(); > }; >+ >+subtest 'aliases' => sub { >+ >+ plan tests => 3; >+ >+ $schema->storage->txn_begin(); >+ >+ my $vendor = $builder->build_object( { class => 'Koha::Acquisition::Booksellers' } ); >+ >+ is( $vendor->aliases->count, 0, 'Vendor has no aliases' ); >+ >+ $vendor->aliases( [ { alias => 'alias 1' }, { alias => 'alias 2' } ] ); >+ >+ $vendor = $vendor->get_from_storage; >+ my $aliases = $vendor->aliases; >+ is( $aliases->count, 2 ); >+ is( ref($aliases), 'Koha::Acquisition::Bookseller::Aliases', 'Type is correct' ); >+ >+ $schema->storage->txn_rollback(); >+}; >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33103
:
147621
|
147622
|
147623
|
147624
|
147625
|
147626
|
147627
|
147628
|
147629
|
147630
|
147645
|
147646
|
147647
|
147648
|
147649
|
147650
|
147651
|
147652
|
147653
|
147654
|
147827
|
148448
|
148449
|
148450
|
148451
|
148452
|
148453
|
148454
|
148455
|
148456
|
148457
|
148458
|
149414
|
149419
|
149479
|
149480
|
149481
|
149482
|
149483
|
149484
|
149485
|
149486
|
149487
|
149488
|
149489
|
149490
|
149491
|
149606
|
149607
|
149608
|
149609
|
149629
|
149630
|
149788