<?php
use App\Models\Merchant;
it('encrypts the persisted two factor secret',function(){config()->set('gateway.security.allow_local_encryption_in_production',true);$m=Merchant::factory()->create(['two_factor_secret'=>'ABCDEF123456','two_factor_enabled'=>true]);$raw=DB::table('merchants')->where('id',$m->id)->value('two_factor_secret');expect($raw)->not->toContain('ABCDEF123456')->and($m->fresh()->two_factor_secret)->toBe('ABCDEF123456');});
