2222-export ([create_cashlimit_validation_error_test /1 ]).
2323-export ([create_inconsistent_currency_validation_error_test /1 ]).
2424-export ([create_currency_validation_error_test /1 ]).
25- -export ([create_destination_resource_notfound_test /1 ]).
25+ -export ([create_destination_resource_no_bindata_ok_test /1 ]).
26+ -export ([create_destination_resource_no_bindata_fail_test /1 ]).
2627-export ([create_destination_notfound_test /1 ]).
2728-export ([create_destination_generic_ok_test /1 ]).
2829-export ([create_wallet_notfound_test /1 ]).
@@ -55,7 +56,8 @@ groups() ->
5556 create_cashlimit_validation_error_test ,
5657 create_currency_validation_error_test ,
5758 create_inconsistent_currency_validation_error_test ,
58- create_destination_resource_notfound_test ,
59+ create_destination_resource_no_bindata_ok_test ,
60+ create_destination_resource_no_bindata_fail_test ,
5961 create_destination_notfound_test ,
6062 create_destination_generic_ok_test ,
6163 create_wallet_notfound_test ,
@@ -280,8 +282,8 @@ create_inconsistent_currency_validation_error_test(C) ->
280282 },
281283 ? assertEqual ({exception , ExpectedError }, Result ).
282284
283- -spec create_destination_resource_notfound_test (config ()) -> test_return ().
284- create_destination_resource_notfound_test (C ) ->
285+ -spec create_destination_resource_no_bindata_fail_test (config ()) -> test_return ().
286+ create_destination_resource_no_bindata_fail_test (C ) ->
285287 Cash = make_cash ({100 , <<" RUB" >>}),
286288 #{
287289 wallet_id := WalletID ,
@@ -293,9 +295,27 @@ create_destination_resource_notfound_test(C) ->
293295 destination_id = DestinationID ,
294296 body = Cash
295297 },
298+ ? assertError (
299+ {woody_error , {external , result_unexpected , _ }},
300+ call_withdrawal ('Create' , {Params , #{}})
301+ ).
302+
303+ -spec create_destination_resource_no_bindata_ok_test (config ()) -> test_return ().
304+ create_destination_resource_no_bindata_ok_test (C ) ->
305+ % % As per test terms this specific cash amount results in valid cashflow without bin data
306+ Cash = make_cash ({424242 , <<" RUB" >>}),
307+ #{
308+ wallet_id := WalletID ,
309+ destination_id := DestinationID
310+ } = prepare_standard_environment (Cash , <<" TEST_NOTFOUND" >>, C ),
311+ Params = # wthd_WithdrawalParams {
312+ id = generate_id (),
313+ wallet_id = WalletID ,
314+ destination_id = DestinationID ,
315+ body = Cash
316+ },
296317 Result = call_withdrawal ('Create' , {Params , #{}}),
297- ExpectedError = # wthd_NoDestinationResourceInfo {},
298- ? assertEqual ({exception , ExpectedError }, Result ).
318+ ? assertMatch ({ok , _ }, Result ).
299319
300320-spec create_destination_notfound_test (config ()) -> test_return ().
301321create_destination_notfound_test (C ) ->
0 commit comments