FAIL Tests\Feature\Api\AdminTest ✓ non admin cannot access admin routes 4.23s ✓ admin can view all users 0.08s ✓ admin can view user details 0.06s ✓ admin can manage user roles 0.05s ⨯ admin can suspend user 0.05s ⨯ admin can view all plans 0.13s ⨯ admin can create plan 0.10s ⨯ admin can update plan 0.05s ⨯ admin can manage plan features 0.05s ⨯ admin can view templates 0.02s ✓ admin can create template 0.05s ⨯ admin can view revenue reports 0.03s ⨯ admin can view user reports 0.05s ⨯ admin can view feature usage 0.05s ⨯ staff can manage templates 0.03s ✓ staff cannot manage users 0.05s ✓ staff cannot manage plans 0.04s ──────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\Api\AdminTest > admin can suspend user Failed asserting that 0 is true. at tests\Feature\Api\AdminTest.php:113 109▕ 110▕ $response->assertStatus(200); 111▕ 112▕ $testUser->refresh(); ➜ 113▕ $this->assertTrue($testUser->is_suspended); 114▕ } 115▕ 116▕ public function test_admin_can_view_all_plans() 117▕ { 1 tests\Feature\Api\AdminTest.php:113 ──────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\Api\AdminTest > admin can view all… QueryException SQLSTATE[42S22]: Column not found: 1054 Unknown column 'description' in 'field list' (Connection: mysql, Host: 127.0.0.1, Port: 3306, Database: resume_saas, SQL: insert into `plans` (`name`, `description`, `price`, `billing_cycle`, `duration_days`, `is_active`, `features_json`, `updated_at`, `created_at`) values (voluptas Plan, Qui facere itaque ab iusto nihil., 91116, yearly, 365, 1, [], 2026-02-13 13:22:56, 2026-02-13 13:22:56)) at vendor\laravel\framework\src\Illuminate\Database\Connection.php:838 834▕ $exceptionType = $this->isUniqueConstraintError($e) 835▕ ? UniqueConstraintViolationException::class 836▕ : QueryException::class; 837▕ ➜ 838▕ throw new $exceptionType( 839▕ $this->getNameWithReadWriteType(), 840▕ $query, 841▕ $this->prepareBindings($bindings), 842▕ $e, 1 vendor\laravel\framework\src\Illuminate\Database\Connection.php:838 2 vendor\laravel\framework\src\Illuminate\Database\MySqlConnection.php:47 NunoMaduro\Collision\Exceptions\TestException::("SQLSTATE[42S22]: Column not found: 1054 Unknown column 'description' in 'field list'") ──────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\Api\AdminTest > admin can create plan Expected response status code [201] but received 500. Failed asserting that 500 is identical to 201. at tests\Feature\Api\AdminTest.php:149 145▕ 'billing_cycle' => 'monthly', 146▕ 'duration_days' => 30, 147▕ ]); 148▕ ➜ 149▕ $response->assertStatus(201) 150▕ ->assertJsonStructure(['id', 'name', 'description']); 151▕ 152▕ $this->assertDatabaseHas('plans', [ 153▕ 'name' => 'Premium Plus', ──────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\Api\AdminTest > admin can update pl… QueryException SQLSTATE[42S22]: Column not found: 1054 Unknown column 'description' in 'field list' (Connection: mysql, Host: 127.0.0.1, Port: 3306, Database: resume_saas, SQL: insert into `plans` (`name`, `description`, `price`, `billing_cycle`, `duration_days`, `is_active`, `features_json`, `updated_at`, `created_at`) values (eum Plan, Laborum qui deserunt provident nemo omnis et voluptatem., 999, lifetime, ?, 1, [], 2026-02-13 13:22:56, 2026-02-13 13:22:56)) at vendor\laravel\framework\src\Illuminate\Database\Connection.php:838 834▕ $exceptionType = $this->isUniqueConstraintError($e) 835▕ ? UniqueConstraintViolationException::class 836▕ : QueryException::class; 837▕ ➜ 838▕ throw new $exceptionType( 839▕ $this->getNameWithReadWriteType(), 840▕ $query, 841▕ $this->prepareBindings($bindings), 842▕ $e, 1 vendor\laravel\framework\src\Illuminate\Database\Connection.php:838 2 vendor\laravel\framework\src\Illuminate\Database\MySqlConnection.php:47 NunoMaduro\Collision\Exceptions\TestException::("SQLSTATE[42S22]: Column not found: 1054 Unknown column 'description' in 'field list'") ──────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\Api\AdminTest > admin can manage pl… QueryException SQLSTATE[42S22]: Column not found: 1054 Unknown column 'description' in 'field list' (Connection: mysql, Host: 127.0.0.1, Port: 3306, Database: resume_saas, SQL: insert into `plans` (`name`, `description`, `price`, `billing_cycle`, `duration_days`, `is_active`, `features_json`, `updated_at`, `created_at`) values (aut Plan, At qui qui ad inventore nostrum laboriosam., 17452, monthly, 365, 1, [], 2026-02-13 13:22:56, 2026-02-13 13:22:56)) at vendor\laravel\framework\src\Illuminate\Database\Connection.php:838 834▕ $exceptionType = $this->isUniqueConstraintError($e) 835▕ ? UniqueConstraintViolationException::class 836▕ : QueryException::class; 837▕ ➜ 838▕ throw new $exceptionType( 839▕ $this->getNameWithReadWriteType(), 840▕ $query, 841▕ $this->prepareBindings($bindings), 842▕ $e, 1 vendor\laravel\framework\src\Illuminate\Database\Connection.php:838 2 vendor\laravel\framework\src\Illuminate\Database\MySqlConnection.php:47 NunoMaduro\Collision\Exceptions\TestException::("SQLSTATE[42S22]: Column not found: 1054 Unknown column 'description' in 'field list'") ──────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\Api\AdminTest > admin can v… BadMethodCallException Call to undefined method App\Models\Template::factory() at vendor\laravel\framework\src\Illuminate\Support\Traits\ForwardsCalls.php:67 63▕ * @throws \BadMethodCallException 64▕ */ 65▕ protected static function throwBadMethodCallException($method) 66▕ { ➜ 67▕ throw new BadMethodCallException(sprintf( 68▕ 'Call to undefined method %s::%s()', static::class, $method 69▕ )); 70▕ } 71▕ } 1 vendor\laravel\framework\src\Illuminate\Support\Traits\ForwardsCalls.php:67 2 vendor\laravel\framework\src\Illuminate\Support\Traits\ForwardsCalls.php:36 ──────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\Api\AdminTest > admin can view revenue reports Failed asserting that an array has the key 'total_revenue'. at tests\Feature\Api\AdminTest.php:234 230▕ $response = $this->actingAs($this->admin) 231▕ ->getJson('/api/admin/reports/revenue?period=month'); 232▕ 233▕ $response->assertStatus(200) ➜ 234▕ ->assertJsonStructure([ 235▕ 'total_revenue', 236▕ 'active_subscriptions', 237▕ 'new_subscriptions', 238▕ 'cancelled_subscriptions', ──────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\Api\AdminTest > admin can view user reports Expected response status code [200] but received 500. Failed asserting that 500 is identical to 200. at tests\Feature\Api\AdminTest.php:252 248▕ 249▕ $response = $this->actingAs($this->admin) 250▕ ->getJson('/api/admin/reports/users?period=month'); 251▕ ➜ 252▕ $response->assertStatus(200) 253▕ ->assertJsonStructure([ 254▕ 'total_users', 255▕ 'new_users', 256▕ 'active_users', ──────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\Api\AdminTest > admin can view feature usage Expected response status code [200] but received 404. Failed asserting that 404 is identical to 200. at tests\Feature\Api\AdminTest.php:268 264▕ { 265▕ $response = $this->actingAs($this->admin) 266▕ ->getJson('/api/admin/reports/features'); 267▕ ➜ 268▕ $response->assertStatus(200) 269▕ ->assertJsonStructure([ 270▕ 'features' => [ 271▕ '*' => [ 272▕ 'name', ──────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\Api\AdminTest > staff can manage templates Expected response status code [200] but received 403. Failed asserting that 403 is identical to 200. at tests\Feature\Api\AdminTest.php:286 282▕ { 283▕ $response = $this->actingAs($this->staff) 284▕ ->getJson('/api/admin/templates'); 285▕ ➜ 286▕ $response->assertStatus(200); 287▕ } 288▕ 289▕ public function test_staff_cannot_manage_users() 290▕ { Tests: 10 failed, 7 passed (79 assertions) Duration: 5.28s