spec/integration/lib/auth0/api/v2/api_jobs_spec.rb in auth0-4.15.0 vs spec/integration/lib/auth0/api/v2/api_jobs_spec.rb in auth0-4.16.0

- old
+ new

@@ -98,9 +98,21 @@ it 'should reject an invalid client_id' do expect do client.send_verification_email(user['user_id'], Random.new(32).to_s) end.to raise_error Auth0::BadRequest end + + it 'should raise an error if the user id is empty' do + expect do + client.send_verification_email( '' ) + end.to raise_error Auth0::InvalidParameter, 'Must specify a user id' + end + + it 'should raise an error if the identity supplied is not a Hash' do + expect do + client.send_verification_email( 'user_id', identity: 'not a hash') + end.to raise_error Auth0::InvalidParameter, 'Identity must be a hash send an email verification' + end end after(:all) do VCR.use_cassette('Auth0_Api_V2_Jobs/delete_imported_user') do new_client = Auth0Client.new(v2_creds)