|
@@ -288,3 +288,26 @@ fn successful_reward_claim_by_curator() {
|
|
.call_and_assert(Ok(()))
|
|
.call_and_assert(Ok(()))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+#[test]
|
|
|
|
+fn unsuccessful_reward_claim_with_no_reward_account_found() {
|
|
|
|
+ with_default_mock_builder(|| {
|
|
|
|
+ run_to_block(1);
|
|
|
|
+
|
|
|
|
+ create_initial_storage_buckets_helper();
|
|
|
|
+ increase_account_balance_helper(DEFAULT_MEMBER_ACCOUNT_ID, INITIAL_BALANCE);
|
|
|
|
+ create_default_member_owned_channel_with_video();
|
|
|
|
+ let payments = create_some_pull_payments_helper();
|
|
|
|
+ update_commit_value_with_payments_helper(&payments);
|
|
|
|
+
|
|
|
|
+ UpdateChannelFixture::default()
|
|
|
|
+ .with_sender(DEFAULT_MEMBER_ACCOUNT_ID)
|
|
|
|
+ .with_actor(ContentActor::Member(DEFAULT_MEMBER_ID))
|
|
|
|
+ .with_reward_account(Some(None))
|
|
|
|
+ .call_and_assert(Ok(()));
|
|
|
|
+
|
|
|
|
+ ClaimChannelRewardFixture::default()
|
|
|
|
+ .with_payments(payments)
|
|
|
|
+ .call_and_assert(Err(Error::<Test>::RewardAccountNotFoundInChannel.into()));
|
|
|
|
+ })
|
|
|
|
+}
|