From 7a635810b1b5cd97f366105f248eb70621ff0d89 Mon Sep 17 00:00:00 2001 From: lohxt1 Date: Mon, 26 Feb 2024 19:11:11 +0530 Subject: [PATCH] feat(#1655): updated bruno-tests collection with an "inherit auht" request example --- .../inherit auth/inherit Bearer Auth 200.bru | 20 +++++++++++++++++++ .../bruno-tests/collection/collection.bru | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 packages/bruno-tests/collection/auth/inherit auth/inherit Bearer Auth 200.bru diff --git a/packages/bruno-tests/collection/auth/inherit auth/inherit Bearer Auth 200.bru b/packages/bruno-tests/collection/auth/inherit auth/inherit Bearer Auth 200.bru new file mode 100644 index 000000000..50cd99018 --- /dev/null +++ b/packages/bruno-tests/collection/auth/inherit auth/inherit Bearer Auth 200.bru @@ -0,0 +1,20 @@ +meta { + name: inherit Bearer Auth 200 + type: http + seq: 2 +} + +get { + url: {{host}}/api/auth/bearer/protected + body: none + auth: inherit +} + +assert { + res.status: 200 + res.body.message: Authentication successful +} + +script:post-response { + bru.setEnvVar("foo", "bar"); +} diff --git a/packages/bruno-tests/collection/collection.bru b/packages/bruno-tests/collection/collection.bru index e31b64995..dfcac9859 100644 --- a/packages/bruno-tests/collection/collection.bru +++ b/packages/bruno-tests/collection/collection.bru @@ -3,7 +3,7 @@ headers { } auth { - mode: none + mode: bearer } auth:basic { @@ -12,7 +12,7 @@ auth:basic { } auth:bearer { - token: {{bearerAuthToken}} + token: {{bearer_auth_token}} } docs {