[Koha-bugs] [Bug 20819] GDPR: Add a consent field for processing personal data in account menu and self-registration

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 7 16:53:10 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20819

--- Comment #69 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
use Modern::Perl;
use Data::Dumper qw/Dumper/;
use Test::More tests => 1;
use Time::HiRes qw/time/;

use t::lib::Mocks;
use t::lib::TestBuilder;

use Koha::Patron::Consents;

my $schema = Koha::Database->new->schema;
my $builder = t::lib::TestBuilder->new;

$schema->storage->txn_begin;
subtest 'myTest' => sub {
    plan tests => 2;

    # Add 1000 consents
    my $firstid;
    foreach(1..100) {
        my $consent = $builder->build_object({ class =>
'Koha::Patron::Consents' });
        $firstid = $consent->borrowernumber if !$firstid;
    }
    my $set = Koha::Patron::Consents->search({ borrowernumber => $firstid });
    #my $set = Koha::Patron::Consents->search;
    my $t1 = time;
    foreach(1..100) { my $i = $set->count; }
    my $t2 = time;
    is(1, 1, sprintf( "COUNT %6.4f\n", $t2 - $t1 ) );
    $t1 = time;
    foreach(1..100) { my $i = $set->next; }
    #foreach(1..1000) { my $i = $set->next; #$set->_resultset->first unless $i;
}
    $t2 = time;
    is(1, 1, sprintf( "NEXT %6.4f\n", $t2 - $t1 ) );
};
$schema->storage->txn_rollback;

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list