|
@@ -195,7 +195,7 @@ mod tests {
|
|
|
with_default_mock_builder(|| {
|
|
|
// The content needs to exist - in our mock, that's with the content ID TEST_MOCK_EXISTING_CID
|
|
|
let res = TestDataObjectStorageRegistry::add_relationship(
|
|
|
- Origin::signed(1),
|
|
|
+ Origin::signed(TEST_MOCK_LIAISON),
|
|
|
TEST_MOCK_EXISTING_CID,
|
|
|
);
|
|
|
assert!(res.is_ok());
|
|
@@ -215,7 +215,7 @@ mod tests {
|
|
|
with_default_mock_builder(|| {
|
|
|
// Create a DOSR
|
|
|
let res = TestDataObjectStorageRegistry::add_relationship(
|
|
|
- Origin::signed(1),
|
|
|
+ Origin::signed(TEST_MOCK_LIAISON),
|
|
|
TEST_MOCK_EXISTING_CID,
|
|
|
);
|
|
|
assert!(res.is_ok());
|
|
@@ -240,14 +240,16 @@ mod tests {
|
|
|
|
|
|
// Toggling with the wrong ID should fail.
|
|
|
let res = TestDataObjectStorageRegistry::set_relationship_ready(
|
|
|
- Origin::signed(1),
|
|
|
+ Origin::signed(TEST_MOCK_LIAISON),
|
|
|
dosr_id + 1,
|
|
|
);
|
|
|
assert!(res.is_err());
|
|
|
|
|
|
// Toggling with the correct ID and origin should succeed
|
|
|
- let res =
|
|
|
- TestDataObjectStorageRegistry::set_relationship_ready(Origin::signed(1), dosr_id);
|
|
|
+ let res = TestDataObjectStorageRegistry::set_relationship_ready(
|
|
|
+ Origin::signed(TEST_MOCK_LIAISON),
|
|
|
+ dosr_id,
|
|
|
+ );
|
|
|
assert!(res.is_ok());
|
|
|
assert_eq!(System::events().last().unwrap().event,
|
|
|
MetaEvent::data_object_storage_registry(data_object_storage_registry::RawEvent::DataObjectStorageRelationshipReadyUpdated(
|