Models unit tests update

This commit is contained in:
Jonathan Labreuille
2016-06-27 13:53:56 +02:00
parent 264b7e180b
commit 306cdeb68f
5 changed files with 109 additions and 3 deletions

View File

@@ -25,6 +25,15 @@ class SettingTest extends MailPoetTest {
expect($default_settings['signup_confirmation']['enabled'])->true();
}
function testItCanLoadDefaults() {
Setting::$defaults = null;
expect(Setting::$defaults)->null();
$default_settings = Setting::getDefaults();
expect(Setting::$defaults)->notEmpty();
expect($default_settings['signup_confirmation']['enabled'])->true();
}
function testItCanGetAllSettingsIncludingDefaults() {
Setting::setValue('key_1', 'value_1');
Setting::setValue('key_2', 'value_2');