feat: handle single constr when with multiple branches
Add case to acceptance test 40 Add special case for top level single constr in a when.
This commit is contained in:
@@ -73,3 +73,12 @@ test single_field_expect() {
|
||||
expect CreateVoteBatch { id } = redeemer
|
||||
id == #""
|
||||
}
|
||||
|
||||
test single_when() {
|
||||
let redeemer = CreateVoteBatch { id: #"" }
|
||||
let x = when redeemer is {
|
||||
CreateVoteBatch { id } -> id == #""
|
||||
_ -> False
|
||||
}
|
||||
x == True
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user