<?php

use Illuminate\Support\Facades\DB;

test('members table has the branch list, status, search, and fulltext indexes', function () {
    $indexNames = collect(DB::select('SHOW INDEX FROM members'))
        ->pluck('Key_name')
        ->unique()
        ->all();

    expect($indexNames)->toContain(
        'members_member_number_unique',
        'members_branch_list_index',
        'members_branch_id_membership_status_index',
        'members_membership_status_index',
        'members_phone_primary_index',
        'members_email_index',
        'members_date_of_birth_index',
        'members_city_index',
        'members_first_name_middle_name_last_name_preferred_name_fulltext',
    );
});
