|
Lines 38-45
subtest "Scenario: Show how caching prevents Test::DBIx::Class from working prop
Link Here
|
| 38 |
ok(1, |
38 |
ok(1, |
| 39 |
'Step: Given Test::DBIx::Class (T:D:C) is loaded and DB accessor is mocked. Connection from cache is still used.'); |
39 |
'Step: Given Test::DBIx::Class (T:D:C) is loaded and DB accessor is mocked. Connection from cache is still used.'); |
| 40 |
|
40 |
|
| 41 |
ok($libCount = Koha::Libraries->search->count, |
41 |
$libCount = Koha::Libraries->search->count; |
| 42 |
' When the libraries are counted'); |
|
|
| 43 |
|
42 |
|
| 44 |
is($libCount, $firstLibCount, |
43 |
is($libCount, $firstLibCount, |
| 45 |
' Then we got the same count as without T:D:C'); |
44 |
' Then we got the same count as without T:D:C'); |
|
Lines 55-62
subtest "Scenario: Show how caching prevents Test::DBIx::Class from working prop
Link Here
|
| 55 |
ok(Koha::Database::flush_schema_cache(), |
54 |
ok(Koha::Database::flush_schema_cache(), |
| 56 |
'Step: Given the DB connection cache is flushed'); |
55 |
'Step: Given the DB connection cache is flushed'); |
| 57 |
|
56 |
|
| 58 |
ok(! ($libCount = Koha::Libraries->search->count), |
57 |
$libCount = Koha::Libraries->search->count; |
| 59 |
' When the libraries are counted'); |
|
|
| 60 |
|
58 |
|
| 61 |
is($libCount, 0, |
59 |
is($libCount, 0, |
| 62 |
' Then we got 0 libraries because fixtures are not deployed'); |
60 |
' Then we got 0 libraries because fixtures are not deployed'); |
|
Lines 77-84
subtest "Scenario: Show how caching prevents Test::DBIx::Class from working prop
Link Here
|
| 77 |
], |
75 |
], |
| 78 |
'Step: Given we deploy T:D:C Fixtures'); |
76 |
'Step: Given we deploy T:D:C Fixtures'); |
| 79 |
|
77 |
|
| 80 |
ok($libCount = Koha::Libraries->search->count, |
78 |
$libCount = Koha::Libraries->search->count; |
| 81 |
' When the libraries are counted'); |
|
|
| 82 |
|
79 |
|
| 83 |
is($libCount, 1, |
80 |
is($libCount, 1, |
| 84 |
' Then we got the count from fixtures'); |
81 |
' Then we got the count from fixtures'); |
| 85 |
- |
|
|