Skip to content

Commit

Permalink
Fix site online tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnieezell committed Aug 4, 2022
1 parent 50a2c9e commit 0b24887
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/Settings/GeneralSettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public function testSaveSettings()
$response->assertRedirect();

$this->assertSame('My Great Site', setting('Site.siteName'));
$this->assertTrue(setting('Site.siteOnline'));
$this->assertTrue(setting('Site.siteOnline') === '1');
}
}
2 changes: 1 addition & 1 deletion tests/Settings/SiteOfflineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function setUp(): void

public function testOnlySuperAdminWhenOff()
{
setting('Site.siteOnline', false);
setting('Site.siteOnline', null);

// Superadmin should be able to see the site
$this->actingAs($this->admin)
Expand Down
4 changes: 2 additions & 2 deletions tests/SiteOnlineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ public function testSiteOnline()

public function testSiteOffline()
{
setting('Site.siteOnline', false);
setting('Site.siteOnline', null);
$response = $this->get('/');

$response->assertRedirectTo('site-offline');
}

public function testSiteOfflineSuperAdmin()
{
setting('Site.siteOnline', false);
setting('Site.siteOnline', null);

$user = $this->createUser();
$user->addGroup('superadmin');
Expand Down

0 comments on commit 0b24887

Please sign in to comment.