Msg/UpdateSubjectSteward
UpdateSubjectSteward is successful when:
- steward is the subject steward
UpdateSubjectSteward has the following outcomes:
- message response returned
- Content is updated in state
- EventUpdateSubjectSteward is emitted
The steward must be the subject steward
Background
Given subject
{
"address": "G+ksLYTNBuzyqdTij+Xkx1ztGDzOMACTUcjF6iEkiH0=",
"steward": "BTZfSbi0JKqguZ/tIAPUIhdAa7Y=",
"metadata": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}
steward is subject steward
When msg update subject steward
{
"address": "chora1r05jctvye5rweu4f6n3gle0ycaww6xpueccqpy63erz75gfy3p7snu2hw4",
"steward": "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38",
"new_steward": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup"
}
Then expect no error.
steward is not subject steward
When msg update subject steward
{
"address": "chora1r05jctvye5rweu4f6n3gle0ycaww6xpueccqpy63erz75gfy3p7snu2hw4",
"steward": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup",
"new_steward": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup"
}
Then expect the error
steward chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup: subject steward chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38: unauthorized
The message response is returned
Background
Given subject
{
"address": "G+ksLYTNBuzyqdTij+Xkx1ztGDzOMACTUcjF6iEkiH0=",
"steward": "BTZfSbi0JKqguZ/tIAPUIhdAa7Y=",
"metadata": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}
message response returned
When msg update subject steward
{
"address": "chora1r05jctvye5rweu4f6n3gle0ycaww6xpueccqpy63erz75gfy3p7snu2hw4",
"steward": "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38",
"new_steward": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup"
}
Then expect response
{
"address": "chora1r05jctvye5rweu4f6n3gle0ycaww6xpueccqpy63erz75gfy3p7snu2hw4"
}
Content is updated in state
Background
Given subject
{
"address": "G+ksLYTNBuzyqdTij+Xkx1ztGDzOMACTUcjF6iEkiH0=",
"steward": "BTZfSbi0JKqguZ/tIAPUIhdAa7Y=",
"metadata": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}
state subject updated
When msg update subject steward
{
"address": "chora1r05jctvye5rweu4f6n3gle0ycaww6xpueccqpy63erz75gfy3p7snu2hw4",
"steward": "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38",
"new_steward": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup"
}
Then expect state subject
{
"address": "G+ksLYTNBuzyqdTij+Xkx1ztGDzOMACTUcjF6iEkiH0=",
"steward": "hEyiXxUCaFQmkbuhO9r+QDscjIY=",
"metadata": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}
EventUpdateSubjectSteward emitted
Background
Given subject
{
"address": "G+ksLYTNBuzyqdTij+Xkx1ztGDzOMACTUcjF6iEkiH0=",
"steward": "BTZfSbi0JKqguZ/tIAPUIhdAa7Y=",
"metadata": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}
event update subject steward emitted
When msg update subject steward
{
"address": "chora1r05jctvye5rweu4f6n3gle0ycaww6xpueccqpy63erz75gfy3p7snu2hw4",
"steward": "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38",
"new_steward": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup"
}
Then expect event update subject steward
{
"address": "chora1r05jctvye5rweu4f6n3gle0ycaww6xpueccqpy63erz75gfy3p7snu2hw4"
}