public function testDestroy() { $faker = Faker\Factory::create(); $data = ['libelle' => $faker->name, 'initials' => $faker->name, 'overide_permission' => true]; $role = \Distilleries\Expendable\Models\Role::create($data); $this->call('PUT', action($this->controller . '@putDestroy'), ['id' => $role->id]); $newRole = \Distilleries\Expendable\Models\Role::find($role->id); $this->assertEquals(null, $newRole); }
public function testPermissionRole() { list($role, $service, $permission) = $this->addContent(); $expected = \Distilleries\Expendable\Models\Role::find($role->id); $this->assertEquals($expected, $permission->role); }