|
40 | 40 | expect(data.data.status).to eq(Bandwidth::InProgressLookupStatusEnum::IN_PROGRESS) |
41 | 41 | expect(data.errors).to be_instance_of(Array) |
42 | 42 | end |
| 43 | + |
| 44 | + it 'causes an ArgumentError for a missing account_id' do |
| 45 | + expect { |
| 46 | + @api_instance.create_async_bulk_lookup(nil, Bandwidth::AsyncLookupRequest.new(phone_numbers: phone_numbers)) |
| 47 | + }.to raise_error(ArgumentError) |
| 48 | + end |
| 49 | + |
| 50 | + it 'causes an ArgumentError for a missing async_lookup_request' do |
| 51 | + expect { |
| 52 | + @api_instance.create_async_bulk_lookup(BW_ACCOUNT_ID, nil) |
| 53 | + }.to raise_error(ArgumentError) |
| 54 | + end |
43 | 55 | end |
44 | 56 |
|
45 | 57 | # Create Synchronous Number Lookup |
|
52 | 64 |
|
53 | 65 | data, status_code = @api_instance.create_sync_lookup_with_http_info(BW_ACCOUNT_ID, request) |
54 | 66 |
|
55 | | - expect(status_code).to equal_to(200) |
| 67 | + expect(status_code).to eq(200) |
56 | 68 | expect(data).to be_instance_of(Bandwidth::CreateSyncLookupResponse) |
57 | 69 | expect(data.data.request_id).to be_instance_of(String) |
58 | 70 | expect(data.data.status).to eq(Bandwidth::CompletedLookupStatusEnum::COMPLETE) |
|
68 | 80 | expect(data.data.results[0].latest_message_delivery_status_date).to be_instance_of(Date) |
69 | 81 | expect(data.errors).to be_instance_of(Array) |
70 | 82 | end |
| 83 | + |
| 84 | + it 'causes an ArgumentError for a missing account_id' do |
| 85 | + expect { |
| 86 | + @api_instance.create_sync_lookup(nil, Bandwidth::SyncLookupRequest.new(phone_numbers: phone_numbers, rcs_agent: rcs_agent)) |
| 87 | + }.to raise_error(ArgumentError) |
| 88 | + end |
| 89 | + |
| 90 | + it 'causes an ArgumentError for a missing sync_lookup_request' do |
| 91 | + expect { |
| 92 | + @api_instance.create_sync_lookup(BW_ACCOUNT_ID, nil) |
| 93 | + }.to raise_error(ArgumentError) |
| 94 | + end |
71 | 95 | end |
72 | 96 |
|
73 | 97 | # Get Asynchronous Bulk Number Lookup |
74 | 98 | describe 'get_async_bulk_lookup test' do |
75 | 99 | it 'should work' do |
76 | 100 | data, status_code = @api_instance.get_async_bulk_lookup_with_http_info(BW_ACCOUNT_ID, request_id) |
77 | 101 |
|
78 | | - expect(status_code).to equal_to(200) |
| 102 | + expect(status_code).to eq(200) |
79 | 103 | expect(data).to be_instance_of(Bandwidth::GetAsyncBulkLookupResponse) |
80 | 104 | expect(data.data.request_id).to be_instance_of(String) |
81 | 105 | expect(data.data.status).to eq(Bandwidth::InProgressLookupStatusEnum::COMPLETE) |
|
91 | 115 | expect(data.data.results[0].latest_message_delivery_status_date).to be_instance_of(Date) |
92 | 116 | expect(data.errors).to be_instance_of(Array) |
93 | 117 | end |
| 118 | + |
| 119 | + it 'causes an ArgumentError for a missing account_id' do |
| 120 | + expect { |
| 121 | + @api_instance.get_async_bulk_lookup(nil, request_id) |
| 122 | + }.to raise_error(ArgumentError) |
| 123 | + end |
| 124 | + |
| 125 | + it 'causes an ArgumentError for a missing request_id' do |
| 126 | + expect { |
| 127 | + @api_instance.get_async_bulk_lookup(BW_ACCOUNT_ID, nil) |
| 128 | + }.to raise_error(ArgumentError) |
| 129 | + end |
94 | 130 | end |
95 | 131 | end |
0 commit comments