Stories › shop-orders · version 1 ·
features
shop-orders, shop-customers

Shop: orders and customers✎ edit

An order belongs to a customer and adds up its lines.

$val o = dom.find (cls = "Order", key = "o-1002")
$expect o.total == 29.5
$val c = dom.find (cls = "Customer", key = o.customer)
$expect c.name is "Omar Haddad"
$val o1 = dom.find (cls = "Order", key = "o-1001")
$expect o1.total == 64