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

(-)a/t/db_dependent/Koha/Biblio.t (-5 / +11 lines)
Lines 35-40 use Koha::AuthorisedValueCategories; Link Here
35
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
36
use Koha::MarcSubfieldStructures;
36
use Koha::MarcSubfieldStructures;
37
use Koha::Exception;
37
use Koha::Exception;
38
use Koha::BiblioFrameworks;
38
39
39
use MARC::Field;
40
use MARC::Field;
40
use MARC::Record;
41
use MARC::Record;
Lines 2106-2112 subtest 'opac_summary_html' => sub { Link Here
2106
2107
2107
subtest 'can_be_edited() tests' => sub {
2108
subtest 'can_be_edited() tests' => sub {
2108
2109
2109
    plan tests => 9;
2110
    plan tests => 11;
2110
2111
2111
    $schema->storage->txn_begin;
2112
    $schema->storage->txn_begin;
2112
2113
Lines 2137-2142 subtest 'can_be_edited() tests' => sub { Link Here
2137
    my $fa_biblio = $builder->build_sample_biblio( { frameworkcode => 'FA' } );
2138
    my $fa_biblio = $builder->build_sample_biblio( { frameworkcode => 'FA' } );
2138
    my $fa_patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 0 } } );
2139
    my $fa_patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 0 } } );
2139
2140
2141
    my $is_fa_framework =
2142
        $builder->build_object( { class => 'Koha::BiblioFrameworks', value => { is_fast_add => 1 } } );
2143
    my $is_fa_biblio = $builder->build_sample_biblio( { frameworkcode => $is_fa_framework->frameworkcode } );
2144
2140
    # Add editcatalogue => edit_catalog subpermission
2145
    # Add editcatalogue => edit_catalog subpermission
2141
    $builder->build(
2146
    $builder->build(
2142
        {
2147
        {
Lines 2149-2157 subtest 'can_be_edited() tests' => sub { Link Here
2149
        }
2154
        }
2150
    );
2155
    );
2151
2156
2152
    ok( !$biblio->can_be_edited($fa_patron),   "Fast add permissions are not enough" );
2157
    ok( !$biblio->can_be_edited($fa_patron),      "Fast add permissions are not enough" );
2153
    ok( $fa_biblio->can_be_edited($fa_patron), "Fast add user can edit FA records" );
2158
    ok( $fa_biblio->can_be_edited($fa_patron),    "Fast add user can edit FA records" );
2154
    ok( $fa_biblio->can_be_edited($patron),    "edit_catalogue user can edit FA records" );
2159
    ok( $fa_biblio->can_be_edited($patron),       "edit_catalogue user can edit FA records" );
2160
    ok( $is_fa_biblio->can_be_edited($fa_patron), "Fast add user can edit is_fast_add records" );
2161
    ok( $is_fa_biblio->can_be_edited($patron),    "edit_catalogue user can edit is_fast_add records" );
2155
2162
2156
    # Mock the record source doesn't allow direct editing
2163
    # Mock the record source doesn't allow direct editing
2157
    $source_allows_editing = 0;
2164
    $source_allows_editing = 0;
2158
- 

Return to bug 32773