From b168b860068c235580e565a94875f430f64259d9 Mon Sep 17 00:00:00 2001 From: Avior Date: Mon, 8 Jan 2024 01:33:47 +0100 Subject: [PATCH] chore: Update Bruno tests (#473) --- .../{get Card list.bru => get-cards-list.bru} | 11 ++++++----- .../cards/{get one card.bru => get-one-card.bru} | 3 ++- .bruno/fixes/466-invalid-sorting.bru | 6 +++--- .../467-options-not-working-correctly.bru} | 4 ++-- .bruno/fixes/471-invalid-set-sorting.bru | 6 +++--- .bruno/{GraphQL API.bru => graphql.bru} | 2 +- .bruno/sets/get one card from a set.bru | 15 --------------- ...t list of sets.bru => get-a-list-of-sets.bru} | 4 +++- .bruno/sets/{get a set.bru => get-a-set.bru} | 3 ++- .bruno/sets/get-one-card-from-a-set.bru | 16 ++++++++++++++++ 10 files changed, 38 insertions(+), 32 deletions(-) rename .bruno/cards/{get Card list.bru => get-cards-list.bru} (88%) rename .bruno/cards/{get one card.bru => get-one-card.bru} (74%) rename .bruno/{Validate that we can run OPTIONS.bru => fixes/467-options-not-working-correctly.bru} (68%) rename .bruno/{GraphQL API.bru => graphql.bru} (97%) delete mode 100644 .bruno/sets/get one card from a set.bru rename .bruno/sets/{get list of sets.bru => get-a-list-of-sets.bru} (80%) rename .bruno/sets/{get a set.bru => get-a-set.bru} (76%) create mode 100644 .bruno/sets/get-one-card-from-a-set.bru diff --git a/.bruno/cards/get Card list.bru b/.bruno/cards/get-cards-list.bru similarity index 88% rename from .bruno/cards/get Card list.bru rename to .bruno/cards/get-cards-list.bru index a441b7ea8..2fe59de02 100644 --- a/.bruno/cards/get Card list.bru +++ b/.bruno/cards/get-cards-list.bru @@ -1,5 +1,5 @@ meta { - name: get Card list + name: Get the cards list type: http seq: 1 } @@ -18,10 +18,11 @@ query { ~name: furret } +assert { + res.status: eq 200 + res.body.length: eq 4 +} + docs { Fully describe the card list request, it also has every parameters it can } - -assert { - res.status: eq 200 -} diff --git a/.bruno/cards/get one card.bru b/.bruno/cards/get-one-card.bru similarity index 74% rename from .bruno/cards/get one card.bru rename to .bruno/cards/get-one-card.bru index d7bf56429..0d84e04c1 100644 --- a/.bruno/cards/get one card.bru +++ b/.bruno/cards/get-one-card.bru @@ -1,5 +1,5 @@ meta { - name: get one card + name: Get one card type: http seq: 2 } @@ -12,4 +12,5 @@ get { assert { res.status: eq 200 + res.body.id: eq swsh3-136 } diff --git a/.bruno/fixes/466-invalid-sorting.bru b/.bruno/fixes/466-invalid-sorting.bru index 0fc593d7c..8b0b779d0 100644 --- a/.bruno/fixes/466-invalid-sorting.bru +++ b/.bruno/fixes/466-invalid-sorting.bru @@ -1,5 +1,5 @@ meta { - name: invalid sorting + name: 466 - Invalid Sorting type: http seq: 1 } @@ -16,7 +16,7 @@ assert { } docs { - Validate the issue seen in - + Validate the issue seen in + https://github.com/tcgdex/cards-database/issues/466 } diff --git a/.bruno/Validate that we can run OPTIONS.bru b/.bruno/fixes/467-options-not-working-correctly.bru similarity index 68% rename from .bruno/Validate that we can run OPTIONS.bru rename to .bruno/fixes/467-options-not-working-correctly.bru index 6554c41fa..8443c4d58 100644 --- a/.bruno/Validate that we can run OPTIONS.bru +++ b/.bruno/fixes/467-options-not-working-correctly.bru @@ -1,7 +1,7 @@ meta { - name: Validate that we can run OPTIONS + name: 467 - Validate that we can run OPTIONS type: http - seq: 1 + seq: 3 } options { diff --git a/.bruno/fixes/471-invalid-set-sorting.bru b/.bruno/fixes/471-invalid-set-sorting.bru index 1e1575d04..c2a0457a1 100644 --- a/.bruno/fixes/471-invalid-set-sorting.bru +++ b/.bruno/fixes/471-invalid-set-sorting.bru @@ -1,5 +1,5 @@ meta { - name: 471-invalid-set-sorting + name: 471 - Invalid Set Sorting type: http seq: 2 } @@ -16,7 +16,7 @@ assert { } docs { - Validate the issue seen in - + Validate the issue seen in + https://github.com/tcgdex/cards-database/issues/471 } diff --git a/.bruno/GraphQL API.bru b/.bruno/graphql.bru similarity index 97% rename from .bruno/GraphQL API.bru rename to .bruno/graphql.bru index cc1ec38df..55a869c96 100644 --- a/.bruno/GraphQL API.bru +++ b/.bruno/graphql.bru @@ -1,7 +1,7 @@ meta { name: GraphQL API type: graphql - seq: 2 + seq: 1 } post { diff --git a/.bruno/sets/get one card from a set.bru b/.bruno/sets/get one card from a set.bru deleted file mode 100644 index c1169d1cd..000000000 --- a/.bruno/sets/get one card from a set.bru +++ /dev/null @@ -1,15 +0,0 @@ -meta { - name: get one card from a set - type: http - seq: 1 -} - -get { - url: {{BASE_URL}}/v2/en/cards/swsh3 - body: none - auth: none -} - -assert { - res.status: eq 200 -} diff --git a/.bruno/sets/get list of sets.bru b/.bruno/sets/get-a-list-of-sets.bru similarity index 80% rename from .bruno/sets/get list of sets.bru rename to .bruno/sets/get-a-list-of-sets.bru index da9b7823f..4389141d6 100644 --- a/.bruno/sets/get list of sets.bru +++ b/.bruno/sets/get-a-list-of-sets.bru @@ -1,5 +1,5 @@ meta { - name: get list of sets + name: Get a list of sets type: http seq: 3 } @@ -20,4 +20,6 @@ query { assert { res.status: eq 200 + res.body[0].id: eq swsh3 + res.body.length: eq 1 } diff --git a/.bruno/sets/get a set.bru b/.bruno/sets/get-a-set.bru similarity index 76% rename from .bruno/sets/get a set.bru rename to .bruno/sets/get-a-set.bru index 5f3200b37..e297b9856 100644 --- a/.bruno/sets/get a set.bru +++ b/.bruno/sets/get-a-set.bru @@ -1,5 +1,5 @@ meta { - name: get a set + name: Get a set type: http seq: 2 } @@ -12,4 +12,5 @@ get { assert { res.status: eq 200 + res.body.id: eq swsh3 } diff --git a/.bruno/sets/get-one-card-from-a-set.bru b/.bruno/sets/get-one-card-from-a-set.bru new file mode 100644 index 000000000..a64afa591 --- /dev/null +++ b/.bruno/sets/get-one-card-from-a-set.bru @@ -0,0 +1,16 @@ +meta { + name: Get one card from a set + type: http + seq: 1 +} + +get { + url: {{BASE_URL}}/v2/en/sets/swsh3/136 + body: none + auth: none +} + +assert { + res.status: eq 200 + res.body.id: eq swsh3-136 +}