gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 01/07: update test for new auth api


From: gnunet
Subject: [taler-wallet-core] 01/07: update test for new auth api
Date: Thu, 09 Nov 2023 14:01:46 +0100

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

commit eb3ce7e9abb04d1cd24ae070b04b2c8698dd3594
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Nov 9 09:59:21 2023 -0300

    update test for new auth api
---
 .../src/context/backend.test.ts                    | 26 ++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/packages/merchant-backoffice-ui/src/context/backend.test.ts 
b/packages/merchant-backoffice-ui/src/context/backend.test.ts
index ad6393e29..359859819 100644
--- a/packages/merchant-backoffice-ui/src/context/backend.test.ts
+++ b/packages/merchant-backoffice-ui/src/context/backend.test.ts
@@ -31,6 +31,7 @@ import { expect } from "chai";
 import { ApiMockEnvironment } from "../hooks/testing.js";
 import {
   API_CREATE_INSTANCE,
+  API_NEW_LOGIN,
   API_UPDATE_CURRENT_INSTANCE_AUTH,
   API_UPDATE_INSTANCE_AUTH_BY_ID,
 } from "../hooks/urls.js";
@@ -63,6 +64,17 @@ describe("backend context api ", () => {
               name: "instance_name",
             } as MerchantBackend.Instances.QueryInstancesResponse,
           });
+          env.addRequestExpectation(API_NEW_LOGIN, {
+            auth: "another_token",
+            request: {
+              scope: "write",
+              duration: {
+                "d_us": "forever",
+              },
+              refreshable: true,
+            },
+            
+          });
 
           management.setNewAccessToken(undefined,"another_token" as 
AccessToken);
         },
@@ -72,7 +84,7 @@ describe("backend context api ", () => {
           });
 
           env.addRequestExpectation(API_CREATE_INSTANCE, {
-            auth: "another_token",
+            // auth: "another_token",
             request: {
               id: "new_instance_id",
             } as MerchantBackend.Instances.InstanceConfigurationMessage,
@@ -113,6 +125,16 @@ describe("backend context api ", () => {
               name: "instance_name",
             } as MerchantBackend.Instances.QueryInstancesResponse,
           });
+          env.addRequestExpectation(API_NEW_LOGIN, {
+            auth: "another_token",
+            request: {
+              scope: "write",
+              duration: {
+                "d_us": "forever",
+              },
+              refreshable: true,
+            },            
+          });
           instance.setNewAccessToken(undefined, "another_token" as 
AccessToken);
         },
         ({ instance, management, admin }) => {
@@ -121,7 +143,7 @@ describe("backend context api ", () => {
           });
 
           env.addRequestExpectation(API_CREATE_INSTANCE, {
-            auth: "another_token",
+            // auth: "another_token",
             request: {
               id: "new_instance_id",
             } as MerchantBackend.Instances.InstanceConfigurationMessage,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]