From 8434553bb2580b36b22f056ac527060820e92f41 Mon Sep 17 00:00:00 2001 From: Thinuri Wijesekara Date: Fri, 28 Feb 2025 14:33:14 +0530 Subject: [PATCH] Update with short hand method for variable assigning in tests --- ballerina/tests/tests.bal | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ballerina/tests/tests.bal b/ballerina/tests/tests.bal index 9f4ef35..7715707 100644 --- a/ballerina/tests/tests.bal +++ b/ballerina/tests/tests.bal @@ -37,7 +37,7 @@ string globalEventId = ""; string eventId = ""; isolated function initApiKeyClient() returns Client|error { - if isLiveServer{ + if isLiveServer { if hapikey == "" { return error("API Key is missing."); } @@ -63,9 +63,9 @@ isolated function initOAuth2Client() returns Client|error { return error("OAuth2 credentials are not available"); } OAuth2RefreshTokenGrantConfig oauthConfig = { - clientId: clientId, - clientSecret: clientSecret, - refreshToken: refreshToken, + clientId, + clientSecret, + refreshToken, credentialBearer: oauth2:POST_BODY_BEARER }; return check new ({auth: oauthConfig}, serviceUrl); @@ -127,7 +127,7 @@ function testUpdateEventTemplate() returns error? { lock { eventTemplateId = globalEventTemplateId; } - TimelineEventTemplateUpdateRequest payload ={ + TimelineEventTemplateUpdateRequest payload = { detailTemplate: "Registration occurred at {{#formatDate timestamp}}{{/formatDate}}\n\n#### Questions\n{{#each extraData.questions}}\n **{{question}}**: {{answer}}\n{{/each}}\n\nEDIT", name: "PetSpot Registration", tokens: [