Upload invoice documents via UI (#1495)

This commit is contained in:
Kevin Papst
2020-02-27 23:19:19 +01:00
committed by GitHub
parent 34d2228d5d
commit bf11de82fc
16 changed files with 245 additions and 12 deletions

View File

@@ -224,4 +224,20 @@ class InvoiceControllerTest extends ControllerBaseTest
$this->assertEquals(0, $em->getRepository(InvoiceTemplate::class)->count([]));
}
public function testUploadDocumentAction()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
$em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
$fixture = new InvoiceFixtures();
$this->importFixture($client, $fixture);
$this->request($client, '/invoice/document_upload');
$this->assertTrue($client->getResponse()->isSuccessful());
$node = $client->getCrawler()->filter('div.box#invoice_document_list');
self::assertEquals(1, $node->count());
// we do not test the upload here, just make sure that the action can be rendered properly
}
}