Enhance tests with conjured

This commit is contained in:
Ilias Mentzelos 2020-03-05 21:24:38 +02:00
parent 46e8d868e6
commit 11fd218253

View File

@ -105,4 +105,20 @@ describe('Gilded Rose', function () {
expect(items[0].sellIn).to.equal(-1);
expect(items[0].quality).to.equal(0);
});
it('should decrease by 2 before the sell date for "Conjured"', function() {
const gildedRose = new GildedRose([ new Item('Conjured', 10, 40) ]);
const items = gildedRose.updateQuality();
expect(items[0].name).to.equal('Conjured');
expect(items[0].sellIn).to.equal(9);
expect(items[0].quality).to.equal(38);
});
it('should decrease by 4 after the sell date for "Conjured"', function() {
const gildedRose = new GildedRose([ new Item('Conjured', 0, 40) ]);
const items = gildedRose.updateQuality();
expect(items[0].name).to.equal('Conjured');
expect(items[0].sellIn).to.equal(9);
expect(items[0].quality).to.equal(36);
});
});