-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcustomer_spec.rb
More file actions
45 lines (39 loc) · 1.41 KB
/
customer_spec.rb
File metadata and controls
45 lines (39 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# #Unit OpenAPI specifications
#
# An OpenAPI specifications for unit-sdk clients
#
# The version of the OpenAPI document: 0.2.0
#
# Generated by: https://openapi-generator.tech
# OpenAPI Generator version: 6.2.1
#
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::Customer
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
RSpec.describe 'Customer' do
before do
configure_tests
end
describe 'test an instance of Customer' do
let(:api_instance) { OpenapiClient::GetCustomerApi.new(OpenapiClient::ApiClient.new(configuration)) }
it 'should get an instance of individual Customer' do
response = api_instance.execute('733576')
expect(response.data.type).to eq('individualCustomer')
end
it 'should get an instance of individual Customer' do
response = api_instance.execute('733565')
expect(response.data.type).to eq('businessCustomer')
end
end
describe 'test an instance of list customers' do
let(:api_instance) { OpenapiClient::GetListCustomersApi.new(OpenapiClient::ApiClient.new(configuration)) }
it 'should list customers' do
opts = { query_params: {"page[limit]": 10, "page[offset]": 0, "filter[email]": 'jone.doe1@unit-finance.com'}}
response = api_instance.execute(opts)
expect(response.data[0].type).to eq('individualCustomer')
end
end
end