diff --git a/stores/tables/insurance/__tests__/index.test.js b/stores/tables/insurance/__tests__/index.test.js index aef13b2..1fac12c 100644 --- a/stores/tables/insurance/__tests__/index.test.js +++ b/stores/tables/insurance/__tests__/index.test.js @@ -83,67 +83,6 @@ describe('stores/tables/insurance', () => { }); }); - describe('[method] setManyRowOptions', () => { - it('should replace only kasko options', () => { - const rootStore = new RootStore(); - const { insurance } = rootStore.$tables; - - insurance.setManyRowOptions({ - kasko: { - insuranceCompany: INSURANCE_COMPANIES_OPTIONS, - insured: INSURED_OPTIONS, - }, - }); - - const KASKO = toJS(insurance.getRowOptions('kasko')); - const OSAGO = toJS(insurance.getRowOptions('osago')); - const FINGAP = toJS(insurance.getRowOptions('fingap')); - - expect(KASKO).toEqual({ - insuranceCompany: INSURANCE_COMPANIES_OPTIONS, - insured: INSURED_OPTIONS, - insTerm: defaultOptions.kasko.insTerm, - }); - - expect(OSAGO).toEqual(defaultOptions.osago); - - expect(FINGAP).toEqual(defaultOptions.fingap); - }); - - it('should replace only kasko and osago options', () => { - const rootStore = new RootStore(); - const { insurance } = rootStore.$tables; - - insurance.setManyRowOptions({ - kasko: { - insuranceCompany: INSURANCE_COMPANIES_OPTIONS, - insured: INSURED_OPTIONS, - }, - osago: { - insured: INSURED_OPTIONS, - }, - }); - - const KASKO = toJS(insurance.getRowOptions('kasko')); - const OSAGO = toJS(insurance.getRowOptions('osago')); - const FINGAP = toJS(insurance.getRowOptions('fingap')); - - expect(KASKO).toEqual({ - insuranceCompany: INSURANCE_COMPANIES_OPTIONS, - insured: INSURED_OPTIONS, - insTerm: defaultOptions.kasko.insTerm, - }); - - expect(OSAGO).toEqual({ - insuranceCompany: defaultOptions.osago.insuranceCompany, - insured: INSURED_OPTIONS, - insTerm: defaultOptions.osago.insTerm, - }); - - expect(FINGAP).toEqual(defaultOptions.fingap); - }); - }); - describe('[method] setRowStatuses', () => { it('should replace only insuranceCompany and insured statuses', () => { const rootStore = new RootStore(); diff --git a/stores/tables/insurance/index.ts b/stores/tables/insurance/index.ts index 246ce3e..1c7792b 100644 --- a/stores/tables/insurance/index.ts +++ b/stores/tables/insurance/index.ts @@ -59,13 +59,6 @@ export default class InsuranceTable { this.options[key] = { ...this.options[key], ...rowOptions }; }; - setManyRowOptions = (options: Partial>) => { - (Object.keys(options) as Insurance.Keys[]).forEach((key) => { - const rowOptions = options[key]; - if (rowOptions !== undefined) this.setRowOptions(key, rowOptions); - }); - }; - getRowStatuses(key: Insurance.Keys) { return this.statuses[key]; }