Created
July 27, 2019 10:28
-
-
Save jasongorman/d1dd06d15164d141d46d81bb74063d9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('sets the price for the new CD', function(){ | |
const catalogue = new Catalogue(contents=[], new CdFactory()); | |
const warehouse = new Warehouse(catalogue); | |
const batch = { | |
cds: [ | |
{ | |
title: 'Bat Out Of Hell', | |
artist: 'Meatloaf', | |
copies: 10, | |
price: 9.99 | |
} | |
] | |
} | |
warehouse.receive(batch); | |
const cd = catalogue.search('Bat Out Of Hell', 'Meatloaf'); | |
assert.equal(cd.price, 9.99); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment