1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Simplified default folder concept

This commit is contained in:
Laurent Cozic
2017-06-04 13:53:38 +01:00
parent fdab917043
commit 8d51fb779d
2 changed files with 3 additions and 28 deletions

View File

@ -12,7 +12,7 @@ class FolderTest extends BaseTestCase {
Folder::truncate();
}
public function testDefault() {
public function testNewFolderBecomesDefault() {
$f1 = new Folder();
$f1->is_default = true;
$f1->owner_id = TestUtils::userId();
@ -29,18 +29,5 @@ class FolderTest extends BaseTestCase {
$this->assertTrue(!$f1->is_default);
$this->assertTrue(!!$f2->is_default);
}
public function testDefaultException() {
$this->expectException(Exception::class);
$f1 = new Folder();
$f1->is_default = true;
$f1->owner_id = TestUtils::userId();
$f1->save();
$f1 = Folder::find($f1->id);
$f1->is_default = false;
$f1->save();
}
}