]> BookStack Code Mirror - bookstack/commitdiff
Fixed failing book view test
authorDan Brown <redacted>
Sat, 30 Dec 2017 16:09:27 +0000 (16:09 +0000)
committerDan Brown <redacted>
Sat, 30 Dec 2017 16:09:27 +0000 (16:09 +0000)
Also ensured setting system localcache is cleared correctly

app/Services/SettingService.php
tests/Entity/EntityTest.php

index 18a7c0d1b75846543aee5b535c45cd1ea4134ac7..ce87f5a4b8da2d9962a857a26d9f71427ed19838 100644 (file)
@@ -98,6 +98,9 @@ class SettingService
     {
         $cacheKey = $this->cachePrefix . $key;
         $this->cache->forget($cacheKey);
+        if (isset($this->localCache[$key])) {
+            unset($this->localCache[$key]);
+        }
     }
 
     /**
index 5492534177b9795eb36532c038aaa81e2ca2cb2f..4d4e0e6cd30112721df035f16a3386b577354079 100644 (file)
@@ -90,14 +90,14 @@ class EntityTest extends BrowserKitTest
         $this->actingAs($editor)
             ->visit('/books')
             ->pageHasElement('.featured-image-container')
-            ->submitForm('Toggle Book View')
+            ->submitForm('List View')
             // Check redirection.
             ->seePageIs('/books')
             ->pageNotHasElement('.featured-image-container');
 
         $this->actingAs($editor)
             ->visit('/books')
-            ->submitForm('Toggle Book View')
+            ->submitForm('Grid View')
             ->seePageIs('/books')
             ->pageHasElement('.featured-image-container');
 
Morty Proxy This is a proxified and sanitized view of the page, visit original site.