| @@ 121-132 (lines=12) @@ | ||
| 118 | $this->assertTrue($category->canEdit($editor), 'Editor should be able to edit category.'); |
|
| 119 | } |
|
| 120 | ||
| 121 | public function testCanCreate() |
|
| 122 | { |
|
| 123 | $this->useDraftSite(); |
|
| 124 | ||
| 125 | $admin = $this->objFromFixture('Member', 'Admin'); |
|
| 126 | $editor = $this->objFromFixture('Member', 'Editor'); |
|
| 127 | ||
| 128 | $category = singleton(BlogCategory::class); |
|
| 129 | ||
| 130 | $this->assertTrue($category->canCreate($admin), 'Admin should be able to create category.'); |
|
| 131 | $this->assertTrue($category->canCreate($editor), 'Editor should be able to create category.'); |
|
| 132 | } |
|
| 133 | ||
| 134 | public function testCanDelete() |
|
| 135 | { |
|
| @@ 127-138 (lines=12) @@ | ||
| 124 | $this->assertTrue($tag->canEdit($editor), 'Editor should be able to edit tag.'); |
|
| 125 | } |
|
| 126 | ||
| 127 | public function testCanCreate() |
|
| 128 | { |
|
| 129 | $this->useDraftSite(); |
|
| 130 | ||
| 131 | $admin = $this->objFromFixture('Member', 'Admin'); |
|
| 132 | $editor = $this->objFromFixture('Member', 'Editor'); |
|
| 133 | ||
| 134 | $tag = singleton(BlogTag::class); |
|
| 135 | ||
| 136 | $this->assertTrue($tag->canCreate($admin), 'Admin should be able to create tag.'); |
|
| 137 | $this->assertTrue($tag->canCreate($editor), 'Editor should be able to create tag.'); |
|
| 138 | } |
|
| 139 | ||
| 140 | public function testCanDelete() |
|
| 141 | { |
|