| @@ 93-103 (lines=11) @@ | ||
| 90 | $this->assertTrue($category->canEdit($editor), 'Editor should be able to edit category.'); |
|
| 91 | } |
|
| 92 | ||
| 93 | public function testCanCreate() |
|
| 94 | { |
|
| 95 | $this->useDraftSite(); |
|
| 96 | ||
| 97 | $admin = $this->objFromFixture('Member', 'Admin'); |
|
| 98 | $editor = $this->objFromFixture('Member', 'Editor'); |
|
| 99 | ||
| 100 | $category = singleton('BlogCategory'); |
|
| 101 | ||
| 102 | $this->assertTrue($category->canCreate($admin), 'Admin should be able to create category.'); |
|
| 103 | $this->assertTrue($category->canCreate($editor), 'Editor should be able to create category.'); |
|
| 104 | } |
|
| 105 | ||
| 106 | public function testCanDelete() |
|
| @@ 99-109 (lines=11) @@ | ||
| 96 | $this->assertTrue($tag->canEdit($editor), 'Editor should be able to edit tag.'); |
|
| 97 | } |
|
| 98 | ||
| 99 | public function testCanCreate() |
|
| 100 | { |
|
| 101 | $this->useDraftSite(); |
|
| 102 | ||
| 103 | $admin = $this->objFromFixture('Member', 'Admin'); |
|
| 104 | $editor = $this->objFromFixture('Member', 'Editor'); |
|
| 105 | ||
| 106 | $tag = singleton('BlogTag'); |
|
| 107 | ||
| 108 | $this->assertTrue($tag->canCreate($admin), 'Admin should be able to create tag.'); |
|
| 109 | $this->assertTrue($tag->canCreate($editor), 'Editor should be able to create tag.'); |
|
| 110 | } |
|
| 111 | ||
| 112 | public function testCanDelete() |
|