Sha256: 22b228cae1f69d8b4dabdcba4764a8582ee41ff2253748092bbec317a5fd439b
Contents?: true
Size: 1.12 KB
Versions: 152
Compression:
Stored size: 1.12 KB
Contents
import groupedSubscriptions, { genericRow, subOneRowOne, subOneRowTwo, 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 = [genericRow, subOneRowOne, subOneRowTwo, 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 = [genericRow, { ...subOneRowOne, entitlementsChanged: true, quantity: 20 }, subOneRowTwo, subTwo, { ...subThree, entitlementsChanged: true, quantity: 150 }, subFour, ]; expect(buildTableRows(groupedSubscriptions, availableQuantities, updatedQuantities)) .toEqual(rows); }); });
Version data entries
152 entries across 152 versions & 1 rubygems