mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
Enhance tests with conjured
This commit is contained in:
parent
46e8d868e6
commit
11fd218253
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user