Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created July 27, 2019 07:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/6364f8f77d12d904991efec30dc30f5f to your computer and use it in GitHub Desktop.
Save jasongorman/6364f8f77d12d904991efec30dc30f5f to your computer and use it in GitHub Desktop.
it('adds the received copies to the stock for that CD', function(){
const cd = new CD(0, 10, new Description('Bat Out Of Hell', 'Meatloaf'));
const catalogue = new Catalogue(contents=[cd]);
const warehouse = new Warehouse(catalogue);
const batch = {
cds: [
{
title: 'Bat Out Of Hell',
artist: 'Meatloaf',
copies: 10
}
]
}
warehouse.receive(batch);
assert.equal(cd.stock, 20);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment