From e964ecebf1c9f45ff8faf3b386eeb3fcb82808b6 Mon Sep 17 00:00:00 2001 From: ryanchristo <12519942+ryanchristo@users.noreply.github.com> Date: Mon, 27 Mar 2023 15:29:32 -0700 Subject: [PATCH] add basket does not exist test case --- .../features/msg_update_date_criteria.feature | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/x/ecocredit/basket/keeper/features/msg_update_date_criteria.feature b/x/ecocredit/basket/keeper/features/msg_update_date_criteria.feature index bd576386d1..f6dffdabac 100644 --- a/x/ecocredit/basket/keeper/features/msg_update_date_criteria.feature +++ b/x/ecocredit/basket/keeper/features/msg_update_date_criteria.feature @@ -1,12 +1,44 @@ Feature: Msg/UpdateDateCriteria Basket date criteria can be updated: + - when the basket exists - when the authority is the governance account - when the basket date criteria is empty - when the basket date criteria includes minimum start date - when the basket date criteria includes start date window - when the basket date criteria includes years in the past + Rule: The basket must exist + + Scenario: the basket does not exist + Given the authority address "regen1nzh226hxrsvf4k69sa8v0nfuzx5vgwkczk8j68" + When alice attempts to update date criteria with message + """ + { + "authority": "regen1nzh226hxrsvf4k69sa8v0nfuzx5vgwkczk8j68", + "denom": "eco.uC.NCT", + "new_date_criteria": { + "years_in_the_past": 10 + } + } + """ + Then expect the error "basket with denom eco.uC.NCT does not exist: not found" + + Scenario: the basket exists + Given the authority address "regen1nzh226hxrsvf4k69sa8v0nfuzx5vgwkczk8j68" + And a basket with denom "eco.uC.NCT" + When alice attempts to update date criteria with message + """ + { + "authority": "regen1nzh226hxrsvf4k69sa8v0nfuzx5vgwkczk8j68", + "denom": "eco.uC.NCT", + "new_date_criteria": { + "years_in_the_past": 10 + } + } + """ + Then expect no error + Rule: The authority address is the governance account Scenario: the authority is not the governance account