Skip to content

Commit

Permalink
[PRDP-242] Fixed filename extension + int test
Browse files Browse the repository at this point in the history
  • Loading branch information
svariant committed Dec 12, 2023
1 parent e54db86 commit 8ccd3c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,13 @@ Then("the list of receipt is recovered from datastore and no receipt in the list
});

Then('the receipt has attachment metadata', function () {
assert.strictEqual(receipt.mdAttachment != null || receipt.mdAttachment != "", true);
assert.strictEqual(receipt.mdAttach != undefined && receipt.mdAttach != null && receipt.mdAttach.name != "", true);
receiptPdfFileName = receipt.mdAttach.name;
});

Then('the PDF is present on blob storage', async function () {
let blobExist = await receiptPDFExist(receiptPdfFileName);
assert.strictEqual(true, blobExist);
assert.strictEqual(blobExist, true);
});

Then("wait {int} ms", async function (milliSec) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ public BlobStorageResponse savePdfToBlobStorage(InputStream pdf, String fileName

//Create the container and return a container client object
BlobContainerClient blobContainerClient = this.blobServiceClient.getBlobContainerClient(containerName);
String fileNamePdf = fileName + FILE_EXTENSION;

//Get a reference to a blob
BlobClient blobClient = blobContainerClient.getBlobClient(fileNamePdf);
BlobClient blobClient = blobContainerClient.getBlobClient(fileName);

//Upload the blob
Response<BlockBlobItem> blockBlobItemResponse = blobClient.uploadWithResponse(
Expand Down

0 comments on commit 8ccd3c2

Please sign in to comment.