"description":"Test cases for the swapBorrowRateMode() function.",
"stories":[
{
"description":"User 0 tries to swap rate mode without any variable rate loan in progress (revert expected)",
"actions":[
{
"name":"swapBorrowRateMode",
"args":{
"reserve":"UNIDAI",
"user":"1",
"borrowRateMode":"variable"
},
"expected":"revert",
"revertMessage":"User does not have a variable rate loan in progress on this reserve"
}
]
},
{
"description":"User 0 tries to swap rate mode without any stable rate loan in progress (revert expected)",
"actions":[
{
"name":"swapBorrowRateMode",
"args":{
"reserve":"UNIDAI",
"user":"1",
"borrowRateMode":"stable"
},
"expected":"revert",
"revertMessage":"User does not have a stable rate loan in progress on this reserve"
}
]
},
{
"description":"User 0 deposits 1000 UNIDAI, user 1 deposits 2 WETH as collateral, borrows 100 UNIDAI at variable rate and swaps to stable after one year",