fix: Tiny's test order names a new customer as the real orders do
All checks were successful
Build and deploy / Validate source (push) Successful in 8s
Build and deploy / Integration suite on a real stack (push) Successful in 3m30s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m7s
All checks were successful
Build and deploy / Validate source (push) Successful in 8s
Build and deploy / Integration suite on a real stack (push) Successful in 3m30s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m7s
The supervised test order would have created Dropstar as a Tiny contact named after its e-mail: the console tool did not look the CNPJ up in the company registry as the worker does. It now uses the same lookup, and the preview says which name the new contact will get. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -336,6 +336,13 @@ class TinySkuTests(FakeTinyCase):
|
||||
text = '\n'.join(lines)
|
||||
self.assertIn('"quantidade": 1', text)
|
||||
self.assertIn('"valorUnitario": 4.47', text)
|
||||
# A new contact is previewed with the name it will get.
|
||||
self.assertIn('será criado como "a@example.test"', text)
|
||||
self.tiny.names = lambda cnpj: {'legal': 'EMPRESA TESTE LTDA', 'trade': 'Teste'}
|
||||
lines.clear()
|
||||
tiny_probe.main(['pedido', '--cnpj', '11222333000182', '--email', 'a@example.test',
|
||||
'--celular', '16999999999'], orders=self.tiny, out=lines.append)
|
||||
self.assertIn('será criado como "EMPRESA TESTE LTDA"', '\n'.join(lines))
|
||||
self.assertEqual(self.orders, [])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user