Fixed failing book view test

Also ensured setting system localcache is cleared correctly
This commit is contained in:
Dan Brown 2017-12-30 16:09:27 +00:00
parent 359b1b40a2
commit 96b8c403a8
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 5 additions and 2 deletions

View File

@ -98,6 +98,9 @@ class SettingService
{ {
$cacheKey = $this->cachePrefix . $key; $cacheKey = $this->cachePrefix . $key;
$this->cache->forget($cacheKey); $this->cache->forget($cacheKey);
if (isset($this->localCache[$key])) {
unset($this->localCache[$key]);
}
} }
/** /**

View File

@ -90,14 +90,14 @@ class EntityTest extends BrowserKitTest
$this->actingAs($editor) $this->actingAs($editor)
->visit('/books') ->visit('/books')
->pageHasElement('.featured-image-container') ->pageHasElement('.featured-image-container')
->submitForm('Toggle Book View') ->submitForm('List View')
// Check redirection. // Check redirection.
->seePageIs('/books') ->seePageIs('/books')
->pageNotHasElement('.featured-image-container'); ->pageNotHasElement('.featured-image-container');
$this->actingAs($editor) $this->actingAs($editor)
->visit('/books') ->visit('/books')
->submitForm('Toggle Book View') ->submitForm('Grid View')
->seePageIs('/books') ->seePageIs('/books')
->pageHasElement('.featured-image-container'); ->pageHasElement('.featured-image-container');