diff --git a/tests/SettingsManagerTest.php b/tests/SettingsManagerTest.php index b4ce516..3a45201 100644 --- a/tests/SettingsManagerTest.php +++ b/tests/SettingsManagerTest.php @@ -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() {