var assert = require("assert");
var discountCalculator = require("../discount");




describe("discount Calculator", function(){
	it("should have discount function", function(){
		assert.equal(discountCalculator.discount instanceof Function, true, "discountCalculator.discount instanceof Function"); 		
	});
});

describe("discount function", function(){
	it("discount should be 0% below single treshold ", function(){
		var rates = {"1000":5}
		var amount = 999;

		var discount = discountCalculator.discount(amount, rates);
		assert.equal(discount, 0, discount + "");

	});
});


@@ -344,24 +344,118 @@
 function()%7B%0A
+%09var rates;%0A%09var amount;%0A%09beforeEach(function()%7B%0A%09%09rates = %7B%221000%22:5%7D%0A%09%09amount = 999;%0A%0A%09%09%7D);%0A%0A
 %09it(%22discoun
@@ -471,9 +471,8 @@
 be 0
-%25
  bel
@@ -511,51 +511,8 @@
 %7B%0A%09%09
-var rates = %7B%221000%22:5%7D%0A%09%09var amount = 999;%0A
 %0A%09%09v

test refactor