Created
July 27, 2019 09:00
-
-
Save jasongorman/35b704a189305fbf73f29263194f3a8a 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
describe('When the CD is not in the catalogue', function(){ | |
it('adds the CD to the catalogue with received copies for initial stock', function(){ | |
const catalogue = new Catalogue(contents=[]); | |
const warehouse = new Warehouse(catalogue); | |
const batch = { | |
cds: [ | |
{ | |
title: 'Bat Out Of Hell', | |
artist: 'Meatloaf', | |
copies: 10 | |
} | |
] | |
} | |
warehouse.receive(batch); | |
const cd = catalogue.search('Bat Out Of Hell', 'Meatloaf'); | |
assert.equal(cd.stock, 10); | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment