2020-06-08 12:03:40 +00:00
{
2020-07-13 08:54:08 +00:00
"title" : "LendingPool: Borrow negatives (reverts)" ,
"description" : "Test cases for the deposit function." ,
"stories" : [
{
2020-08-13 13:46:31 +00:00
"description" : "User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 DAI with rate mode NONE (revert expected)" ,
2020-07-13 08:54:08 +00:00
"actions" : [
{
"name" : "mint" ,
"args" : {
"reserve" : "DAI" ,
"amount" : "1000" ,
"user" : "0"
2020-06-08 12:03:40 +00:00
} ,
2020-07-13 08:54:08 +00:00
"expected" : "success"
} ,
{
"name" : "approve" ,
"args" : {
"reserve" : "DAI" ,
"user" : "0"
2020-06-08 12:03:40 +00:00
} ,
2020-07-13 08:54:08 +00:00
"expected" : "success"
} ,
{
"name" : "deposit" ,
"args" : {
"reserve" : "DAI" ,
"amount" : "1000" ,
"user" : "0"
2020-06-08 12:03:40 +00:00
} ,
2020-07-13 08:54:08 +00:00
"expected" : "success"
} ,
2020-08-13 13:46:31 +00:00
{
"name" : "mint" ,
"args" : {
"reserve" : "WETH" ,
"amount" : "1" ,
"user" : "1"
} ,
"expected" : "success"
} ,
{
"name" : "approve" ,
"args" : {
"reserve" : "WETH" ,
"user" : "1"
} ,
"expected" : "success"
} ,
2020-07-13 08:54:08 +00:00
{
"name" : "deposit" ,
"args" : {
2020-08-13 11:06:23 +00:00
"reserve" : "WETH" ,
2020-07-13 08:54:08 +00:00
"amount" : "1" ,
2020-08-13 13:46:31 +00:00
"user" : "1"
2020-06-08 12:03:40 +00:00
} ,
2020-07-13 08:54:08 +00:00
"expected" : "success"
} ,
{
"name" : "borrow" ,
"args" : {
"reserve" : "DAI" ,
"amount" : "100" ,
"borrowRateMode" : "none" ,
"user" : "1"
2020-06-08 12:03:40 +00:00
} ,
2020-07-13 08:54:08 +00:00
"expected" : "revert" ,
"revertMessage" : "Invalid interest rate mode selected"
}
]
} ,
{
2020-08-13 13:46:31 +00:00
"description" : "User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 DAI with an invalid rate mode (revert expected)" ,
2020-07-13 08:54:08 +00:00
"actions" : [
{
"name" : "mint" ,
"args" : {
"reserve" : "DAI" ,
"amount" : "1000" ,
"user" : "0"
2020-06-08 12:03:40 +00:00
} ,
2020-07-13 08:54:08 +00:00
"expected" : "success"
} ,
{
"name" : "approve" ,
"args" : {
"reserve" : "DAI" ,
"user" : "0"
2020-06-08 12:03:40 +00:00
} ,
2020-07-13 08:54:08 +00:00
"expected" : "success"
} ,
{
"name" : "deposit" ,
"args" : {
"reserve" : "DAI" ,
"amount" : "1000" ,
"user" : "0"
2020-06-08 12:03:40 +00:00
} ,
2020-07-13 08:54:08 +00:00
"expected" : "success"
} ,
2020-08-13 13:46:31 +00:00
{
"name" : "mint" ,
"args" : {
"reserve" : "WETH" ,
"amount" : "1" ,
"user" : "1"
} ,
"expected" : "success"
} ,
{
"name" : "approve" ,
"args" : {
"reserve" : "WETH" ,
"user" : "1"
} ,
"expected" : "success"
} ,
2020-07-13 08:54:08 +00:00
{
"name" : "deposit" ,
"args" : {
2020-08-13 11:06:23 +00:00
"reserve" : "WETH" ,
2020-07-13 08:54:08 +00:00
"amount" : "1" ,
2020-08-17 11:48:23 +00:00
"user" : "1"
2020-07-13 08:54:08 +00:00
} ,
"expected" : "success"
} ,
{
"name" : "borrow" ,
"args" : {
"reserve" : "DAI" ,
"amount" : "100" ,
"borrowRateMode" : "invalid" ,
"user" : "1"
} ,
"expected" : "revert" ,
"revertMessage" : "Invalid interest rate mode selected"
}
]
}
]
}