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

(-)a/t/db_dependent/Koha.t (-2 / +35 lines)
Lines 8-14 use warnings; Link Here
8
use C4::Context;
8
use C4::Context;
9
use Koha::DateUtils qw(dt_from_string);
9
use Koha::DateUtils qw(dt_from_string);
10
10
11
use Test::More tests => 7;
11
use Test::More tests => 8;
12
use DateTime::Format::MySQL;
12
use DateTime::Format::MySQL;
13
13
14
BEGIN {
14
BEGIN {
Lines 261-263 subtest 'getFacets() tests' => sub { Link Here
261
        'location facet present with singleBranchMode on (bug 10078)'
261
        'location facet present with singleBranchMode on (bug 10078)'
262
    );
262
    );
263
};
263
};
264
- 
264
265
subtest 'GetFrameworksLoop() tests' => sub {
266
    plan tests => 1;
267
268
    $dbh->do("DELETE FROM biblio_framework");
269
    $dbh->do("INSERT INTO biblio_framework ( frameworkcode, frameworktext ) VALUES ( 'A', 'Third framework'  )");
270
    $dbh->do("INSERT INTO biblio_framework ( frameworkcode, frameworktext ) VALUES ( 'B', 'Second framework' )");
271
    $dbh->do("INSERT INTO biblio_framework ( frameworkcode, frameworktext ) VALUES ( 'C', 'First framework'  )");
272
273
    my $frameworksloop = GetFrameworksLoop( 'B' );
274
    cmp_deeply(
275
        $frameworksloop,
276
        [
277
            {
278
                'value' => 'C',
279
                'description' => 'First framework',
280
                'selected' => undef
281
            },
282
            {
283
                'value' => 'B',
284
                'description' => 'Second framework',
285
                'selected' => 1,                # selected
286
            },
287
            {
288
                'value' => 'A',
289
                'description' => 'Third framework',
290
                'selected' => undef
291
            },
292
        ],
293
        'frameworks sorted by description with selected val (Bug 12675)'
294
    );
295
296
    $dbh->rollback();
297
};

Return to bug 12675