Skip to content

Commit

Permalink
chore(test): update examples (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Jan 9, 2024
1 parent 48e3a39 commit a42029b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 128 deletions.
130 changes: 4 additions & 126 deletions tests/api-resources/sandbox/directory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const finch = new Finch({

describe('resource directory', () => {
test('create: only required params', async () => {
const responsePromise = finch.sandbox.directory.create([{}, {}, {}]);
const responsePromise = finch.sandbox.directory.create([{}]);
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -23,9 +23,9 @@ describe('resource directory', () => {
test('create: required and optional params', async () => {
const response = await finch.sandbox.directory.create([
{
first_name: 'string',
first_name: 'John',
middle_name: 'string',
last_name: 'string',
last_name: 'Smith',
preferred_name: 'string',
emails: [
{ data: 'string', type: 'work' },
Expand All @@ -39,129 +39,7 @@ describe('resource directory', () => {
],
gender: 'female',
ethnicity: 'asian',
dob: 'string',
ssn: 'string',
encrypted_ssn: 'string',
residence: {
line1: 'string',
line2: 'string',
city: 'string',
state: 'string',
postal_code: 'string',
country: 'string',
name: 'string',
source_id: 'string',
},
title: 'string',
manager: { id: 'string' },
department: { name: 'string' },
employment: { type: 'employee', subtype: 'full_time' },
start_date: 'string',
end_date: 'string',
is_active: true,
class_code: 'string',
location: {
line1: 'string',
line2: 'string',
city: 'string',
state: 'string',
postal_code: 'string',
country: 'string',
name: 'string',
source_id: 'string',
},
income: { unit: 'yearly', amount: 0, currency: 'string', effective_date: 'string' },
income_history: [
{ unit: 'yearly', amount: 0, currency: 'string', effective_date: 'string' },
{ unit: 'yearly', amount: 0, currency: 'string', effective_date: 'string' },
{ unit: 'yearly', amount: 0, currency: 'string', effective_date: 'string' },
],
custom_fields: [
{ name: 'string', value: {} },
{ name: 'string', value: {} },
{ name: 'string', value: {} },
],
source_id: 'string',
},
{
first_name: 'string',
middle_name: 'string',
last_name: 'string',
preferred_name: 'string',
emails: [
{ data: 'string', type: 'work' },
{ data: 'string', type: 'work' },
{ data: 'string', type: 'work' },
],
phone_numbers: [
{ data: 'string', type: 'work' },
{ data: 'string', type: 'work' },
{ data: 'string', type: 'work' },
],
gender: 'female',
ethnicity: 'asian',
dob: 'string',
ssn: 'string',
encrypted_ssn: 'string',
residence: {
line1: 'string',
line2: 'string',
city: 'string',
state: 'string',
postal_code: 'string',
country: 'string',
name: 'string',
source_id: 'string',
},
title: 'string',
manager: { id: 'string' },
department: { name: 'string' },
employment: { type: 'employee', subtype: 'full_time' },
start_date: 'string',
end_date: 'string',
is_active: true,
class_code: 'string',
location: {
line1: 'string',
line2: 'string',
city: 'string',
state: 'string',
postal_code: 'string',
country: 'string',
name: 'string',
source_id: 'string',
},
income: { unit: 'yearly', amount: 0, currency: 'string', effective_date: 'string' },
income_history: [
{ unit: 'yearly', amount: 0, currency: 'string', effective_date: 'string' },
{ unit: 'yearly', amount: 0, currency: 'string', effective_date: 'string' },
{ unit: 'yearly', amount: 0, currency: 'string', effective_date: 'string' },
],
custom_fields: [
{ name: 'string', value: {} },
{ name: 'string', value: {} },
{ name: 'string', value: {} },
],
source_id: 'string',
},
{
first_name: 'string',
middle_name: 'string',
last_name: 'string',
preferred_name: 'string',
emails: [
{ data: 'string', type: 'work' },
{ data: 'string', type: 'work' },
{ data: 'string', type: 'work' },
],
phone_numbers: [
{ data: 'string', type: 'work' },
{ data: 'string', type: 'work' },
{ data: 'string', type: 'work' },
],
gender: 'female',
ethnicity: 'asian',
dob: 'string',
dob: '01/01/2000',
ssn: 'string',
encrypted_ssn: 'string',
residence: {
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/sandbox/employment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('resource employment', () => {
manager: { id: 'string' },
middle_name: 'string',
source_id: 'string',
start_date: 'string',
start_date: '3/4/2020',
title: 'string',
},
{ path: '/_stainless_unknown_path' },
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/sandbox/individual.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('resource individual', () => {
finch.sandbox.individual.update(
'string',
{
dob: 'string',
dob: '12/20/1989',
emails: [
{ data: 'string', type: 'work' },
{ data: 'string', type: 'work' },
Expand Down

0 comments on commit a42029b

Please sign in to comment.