Bugzilla – Attachment 176935 Details for
Bug 32773
Have the ability to have more than 1 Fast Add framework
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32773: (follow-up) Unit tests
Bug-32773-follow-up-Unit-tests.patch (text/plain), 2.35 KB, created by
Brendan Lawlor
on 2025-01-22 19:48:07 UTC
(
hide
)
Description:
Bug 32773: (follow-up) Unit tests
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2025-01-22 19:48:07 UTC
Size:
2.35 KB
patch
obsolete
>From cf3e36636312f4dc8fc1b631335b7687646ad348 Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Wed, 22 Jan 2025 18:33:58 +0000 >Subject: [PATCH] Bug 32773: (follow-up) Unit tests > >--- > t/db_dependent/Koha/Biblio.t | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index 0576acca56..74c96cbda9 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -34,6 +34,7 @@ use Koha::AuthorisedValueCategories; > use Koha::AuthorisedValues; > use Koha::MarcSubfieldStructures; > use Koha::Exception; >+use Koha::BiblioFrameworks; > > use MARC::Field; > use MARC::Record; >@@ -1765,7 +1766,7 @@ subtest 'opac_summary_html' => sub { > > subtest 'can_be_edited() tests' => sub { > >- plan tests => 9; >+ plan tests => 11; > > $schema->storage->txn_begin; > >@@ -1796,6 +1797,10 @@ subtest 'can_be_edited() tests' => sub { > my $fa_biblio = $builder->build_sample_biblio( { frameworkcode => 'FA' } ); > my $fa_patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 0 } } ); > >+ my $is_fa_framework = >+ $builder->build_object( { class => 'Koha::BiblioFrameworks', value => { is_fast_add => 1 } } ); >+ my $is_fa_biblio = $builder->build_sample_biblio( { frameworkcode => $is_fa_framework->frameworkcode } ); >+ > # Add editcatalogue => edit_catalog subpermission > $builder->build( > { >@@ -1808,9 +1813,11 @@ subtest 'can_be_edited() tests' => sub { > } > ); > >- ok( !$biblio->can_be_edited($fa_patron), "Fast add permissions are not enough" ); >- ok( $fa_biblio->can_be_edited($fa_patron), "Fast add user can edit FA records" ); >- ok( $fa_biblio->can_be_edited($patron), "edit_catalogue user can edit FA records" ); >+ ok( !$biblio->can_be_edited($fa_patron), "Fast add permissions are not enough" ); >+ ok( $fa_biblio->can_be_edited($fa_patron), "Fast add user can edit FA records" ); >+ ok( $fa_biblio->can_be_edited($patron), "edit_catalogue user can edit FA records" ); >+ ok( $is_fa_biblio->can_be_edited($fa_patron), "Fast add user can edit is_fast_add records" ); >+ ok( $is_fa_biblio->can_be_edited($patron), "edit_catalogue user can edit is_fast_add records" ); > > # Mock the record source doesn't allow direct editing > $source_allows_editing = 0; >-- >2.39.5
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 32773
:
173401
|
173417
|
173878
|
173879
|
173880
|
173881
|
173882
|
173883
|
173954
|
173955
|
173956
|
173957
|
173958
|
173959
|
173960
|
173961
|
174028
|
174029
|
174030
|
174031
|
174032
|
174033
|
174034
|
174035
|
176927
|
176928
|
176929
|
176930
|
176931
|
176932
|
176933
|
176934
|
176935
|
177860
|
177861
|
177862
|
177863
|
177864
|
177865
|
177866
|
177867