Skip to content

Commit

Permalink
Adding more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Jan 12, 2016
1 parent 877236b commit cbd4d11
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/SettingsManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,23 @@ public function it_can_cast_values_on_save()
$this->assertEquals(['val-1', 'val-2', 'val-3'], $this->settings->get('array'));
}

/** @test */
public function it_can_update()
{
$this->settings->set('company.name', $name = 'Company name');
$this->saveAndMakeSettings();

$this->assertTrue($this->settings->has('company.name'));
$this->assertEquals($name, $this->settings->get('company.name'));

$this->settings->set('company.name', $newName = 'ARCANEDEV');
$this->saveAndMakeSettings();

$this->assertTrue($this->settings->has('company.name'));
$this->assertNotEquals($name, $this->settings->get('company.name'));
$this->assertEquals($newName, $this->settings->get('company.name'));
}

/** @test */
public function it_can_delete()
{
Expand Down

0 comments on commit cbd4d11

Please sign in to comment.