toBeTrue(); expect(Schema::hasColumns('client_sms_campaigns', [ 'tenant_id', 'title', 'body', 'sender_name', 'source', 'audience_days', 'status', 'segments', 'planned_count', 'sent_count', 'total_sms', 'price_rub_per_sms', 'estimated_cost_rub', 'actual_cost_rub', 'created_by', ]))->toBeTrue(); }); it('creates client_sms_campaign_phones with expected columns', function () { expect(Schema::hasTable('client_sms_campaign_phones'))->toBeTrue(); expect(Schema::hasColumns('client_sms_campaign_phones', [ 'tenant_id', 'campaign_id', 'phone', 'expires_at', ]))->toBeTrue(); }); it('creates client_sms_messages with expected columns', function () { expect(Schema::hasTable('client_sms_messages'))->toBeTrue(); expect(Schema::hasColumns('client_sms_messages', [ 'tenant_id', 'campaign_id', 'deal_id', 'phone', 'operator', 'provider_key', 'status', 'cost_rub', 'provider_message_id', 'error', ]))->toBeTrue(); }); it('creates client_sms_optouts with expected columns', function () { expect(Schema::hasTable('client_sms_optouts'))->toBeTrue(); expect(Schema::hasColumns('client_sms_optouts', [ 'tenant_id', 'phone', ]))->toBeTrue(); }); it('creates client_sms_contacts with expected columns', function () { expect(Schema::hasTable('client_sms_contacts'))->toBeTrue(); expect(Schema::hasColumns('client_sms_contacts', [ 'tenant_id', 'phone', 'name', 'operator', ]))->toBeTrue(); }); it('creates client_sms_templates with expected columns', function () { expect(Schema::hasTable('client_sms_templates'))->toBeTrue(); expect(Schema::hasColumns('client_sms_templates', [ 'tenant_id', 'title', 'body', ]))->toBeTrue(); }); it('creates client_sms_tariffs with expected columns and seeds exactly 5 rows', function () { expect(Schema::hasTable('client_sms_tariffs'))->toBeTrue(); expect(Schema::hasColumns('client_sms_tariffs', [ 'min_qty', 'price_rub', ]))->toBeTrue(); expect(DB::table('client_sms_tariffs')->count())->toBe(5); }); it('creates client_sms_settings with expected columns and seeds exactly 1 row', function () { expect(Schema::hasTable('client_sms_settings'))->toBeTrue(); expect(Schema::hasColumns('client_sms_settings', [ 'name_fee_rub_per_operator', 'name_debt_grace_days', ]))->toBeTrue(); expect(DB::table('client_sms_settings')->count())->toBe(1); });