SHARE
TWEET

Untitled

a guest Sep 17th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { config } from 'dotenv';
  2. config();
  3.  
  4. import { expect } from 'chai';
  5. import { getOneTaxAuthorityById } from '../../taxAuthCodes/getOneTaxAuthorityById';
  6. import { updateFederalTaxAuthorityById } from '../updateFederalTaxAuthorityById';
  7.  
  8. describe('Test suite for updateFederalTaxAuthorityById', () => {
  9.  
  10.   it('should update a row', async () => {
  11.     const id = '00';
  12.     const updateName = 'FEDERAL GOVERNMENT';
  13.     const preUpdateName = 'TEST';
  14.     const row = await getOneTaxAuthorityById(id);
  15.  
  16.     expect(row).to.have.property('peoId');
  17.     expect(row).to.have.property('id');
  18.     expect(row).to.have.property('name');
  19.  
  20.     await updateFederalTaxAuthorityById(id, preUpdateName);
  21.     const preUpdateRow = await getOneTaxAuthorityById(id);
  22.  
  23.     await updateFederalTaxAuthorityById(id, updateName);
  24.     const updatedRow = await getOneTaxAuthorityById(id);
  25.  
  26.     expect(preUpdateRow).to.not.equal(updatedRow);
  27.   });
  28.  
  29. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top