MsgUpdateClassAdmin

a valid message

Given the message

{
  "admin": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6",
  "class_id": "C01",
  "new_admin": "regen1tnh2q55v8wyygtt9srz5safamzdengsnlm0yy4"
}

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 admin and new admin are the same

Given the message

{
  "admin": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6",
  "class_id": "C01",
  "new_admin": "regen1depk54cuajgkzea6zpgkq36tnjwdzv4ak663u6"
}

When the message is validated

Then expect the error "admin and new admin cannot be the same: invalid request".