Created
November 11, 2012 09:08
-
-
Save bentayloruk/4054248 to your computer and use it in GitHub Desktop.
Issue 261 Investigation Test
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
module IssueInvestiations | |
open Xunit | |
open Enticify.Promotions | |
[<Fact>] | |
let ``Issue 261 - item and shipping discount interaction`` () = | |
let (basket, orderForm) = | |
createBasket | |
[ Spid("AW475-14", 1m);(* Scout pride cook kit. In discount. *) | |
Vpid("AW190-11", "16", 1m);(* Tent, not in discount.*) ] | |
let result = | |
basket | |
|> (setAllowedDiscounts ["500261"; "5002612"]) | |
|> (addCoupon "sp123") | |
|> runPipeline | |
Assert.Equal(0m, orderForm.ShippingTotal) | |
Assert.Equal<string>("Item", (orderForm.LineItems.[0].ItemLevelDiscountsApplied.[0].["discount_target"].ToString())) | |
() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment