Bug 18226: [QA Follow-up] Remove further assumptions on branch count
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 24 May 2017 12:10:29 +0000 (14:10 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 5 Jun 2017 20:52:48 +0000 (17:52 -0300)
See also follow-up on bug 18286.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/01-test_dbic.t

index c3d9727..0312120 100644 (file)
@@ -38,8 +38,7 @@ subtest "Scenario: Show how caching prevents Test::DBIx::Class from working prop
   ok(1,
   'Step: Given Test::DBIx::Class (T:D:C) is loaded and DB accessor is mocked. Connection from cache is still used.');
 
-  ok($libCount = Koha::Libraries->search->count,
-  '  When the libraries are counted');
+  $libCount = Koha::Libraries->search->count;
 
   is($libCount, $firstLibCount,
   '  Then we got the same count as without T:D:C');
@@ -55,8 +54,7 @@ subtest "Scenario: Show how caching prevents Test::DBIx::Class from working prop
   ok(Koha::Database::flush_schema_cache(),
   'Step: Given the DB connection cache is flushed');
 
-  ok(! ($libCount = Koha::Libraries->search->count),
-  '  When the libraries are counted');
+  $libCount = Koha::Libraries->search->count;
 
   is($libCount, 0,
   '  Then we got 0 libraries because fixtures are not deployed');
@@ -77,8 +75,7 @@ subtest "Scenario: Show how caching prevents Test::DBIx::Class from working prop
   ],
   'Step: Given we deploy T:D:C Fixtures');
 
-  ok($libCount = Koha::Libraries->search->count,
-  '  When the libraries are counted');
+  $libCount = Koha::Libraries->search->count;
 
   is($libCount, 1,
   '  Then we got the count from fixtures');