MsgUpdateClassMetadata
a valid message
Given the message
{
"admin": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6",
"class_id": "C01",
"new_metadata": "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf"
}
When the message is validated
Then expect no error.
a valid message removing metadata
Given the message
{
"admin": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6",
"class_id": "C01"
}
When the message is validated
Then expect no error.
an error is returned if class id is empty
Given the message
{
"admin": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6"
}
When the message is validated
Then expect the error "class id: empty string is not allowed: parse error: invalid request".
an error is returned if class id is not formatted
Given the message
{
"admin": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6",
"class_id": "foo"
}
When the message is validated
Then expect the error "class id: expected format [credit-type-abbrev][class-sequence]: parse error: invalid request".
an error is returned if new metadata exceeds 256 characters
Given the message
{
"admin": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6",
"class_id": "C01"
}
And new metadata with length "257"
When the message is validated
Then expect the error "metadata: max length 256: limit exceeded".