From: Dan Brown Date: Sat, 30 Dec 2017 16:09:27 +0000 (+0000) Subject: Fixed failing book view test X-Git-Tag: v0.20.0~1^2~25 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/96b8c403a8783b514abc280afd96cd3c06e900c2 Fixed failing book view test Also ensured setting system localcache is cleared correctly --- diff --git a/app/Services/SettingService.php b/app/Services/SettingService.php index 18a7c0d1b..ce87f5a4b 100644 --- a/app/Services/SettingService.php +++ b/app/Services/SettingService.php @@ -98,6 +98,9 @@ class SettingService { $cacheKey = $this->cachePrefix . $key; $this->cache->forget($cacheKey); + if (isset($this->localCache[$key])) { + unset($this->localCache[$key]); + } } /** diff --git a/tests/Entity/EntityTest.php b/tests/Entity/EntityTest.php index 549253417..4d4e0e6cd 100644 --- a/tests/Entity/EntityTest.php +++ b/tests/Entity/EntityTest.php @@ -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');