Sha256: f6afadbf827b0bf1730b7585d47e38ee3ab2d24765a76b6a0eedfbae1fd2af17
Contents?: true
Size: 1.02 KB
Versions: 19
Compression:
Stored size: 1.02 KB
Contents
import groupedSubscriptions, { subOne, subTwo, subThree, subFour } from './SubscriptionsTable.fixtures'; import { buildTableRows } from '../SubscriptionsTableHelpers'; describe('Build Table Rows', () => { it('should display correct maxQuantity', () => { const availableQuantities = { 1: 50, 2: 50, 3: -1, 4: 100, 5: 50, }; const rows = [subOne, subTwo, subThree, subFour]; expect(buildTableRows(groupedSubscriptions, availableQuantities, {})) .toEqual(rows); }); it('should update quantities', () => { const availableQuantities = { 1: 50, 2: 50, 3: -1, 4: 100, 5: 50, }; const updatedQuantities = { 1: 20, 4: 150, }; const rows = [ { ...subOne, entitlementsChanged: true, quantity: 20 }, subTwo, { ...subThree, entitlementsChanged: true, quantity: 150 }, subFour, ]; expect(buildTableRows(groupedSubscriptions, availableQuantities, updatedQuantities)) .toEqual(rows); }); });
Version data entries
19 entries across 19 versions & 1 rubygems