-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathout.txt
More file actions
105 lines (87 loc) · 2.42 KB
/
Copy pathout.txt
File metadata and controls
105 lines (87 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
The available shoes function
✓ should return all stored shoes
The filter function
✓ Should filter by brandName and return all shoes that matches that brand
✓ Should filter by brandName and return false if shoe is not found
The filter function
✓ Should filter by Size and return all shoes that matches that Size
The filter function
✓ Should filter by brand and size and return all shoes that matches that brand and size
The update shoe function
✓ Should update shoe that already exist
The add shoe function
✓ Should add new shoe
The add to cart function
✓ Should add shoe into a shopping cart only if shoe does not exist
The update item on cart
✓ Should add shoe into a shopping cart only if shoe does not exist (44ms)
Total of a cart
✓ Should return 0.00 if cart is not empty (45ms)
Total of a cart if its empty
0
✓ Should return 0.00 if cart is empty
View all Items from a cart
✓ Should get all the items from shopping cart if cart is empty should return shopping cart is empty!!!
remove Items from cart
shopping cart is empty!!!
✓ Should remove all the items from shopping cart
✓ Should remove all the items from shopping cart (53ms)
GET /api/shoes
✓ respond with json (58ms)
15 passing (703ms)
{ status: 'success',
data:
[ { id: 15,
qty: 1,
brand_id: 15,
subtotal: '1200',
brand: 'Nike',
color: 'Blue',
shoesize: 8,
price: '1200',
quantity: 0 },
{ id: 2,
qty: 6,
brand_id: 2,
subtotal: '9000',
brand: 'Le coq',
color: 'white',
shoesize: 5,
price: '1500',
quantity: 0 },
{ id: 3,
qty: 2,
brand_id: 3,
subtotal: '1600',
brand: 'Nike',
color: 'black',
shoesize: 7,
price: '800',
quantity: 4 },
{ id: 11,
qty: 1,
brand_id: 11,
subtotal: '350',
brand: 'Le coq',
color: 'Black',
shoesize: 6,
price: '350',
quantity: 0 },
{ id: 1,
qty: 7,
brand_id: 1,
subtotal: '16800',
brand: 'Adidas',
color: 'brown',
shoesize: 6,
price: '2400',
quantity: 0 },
{ id: 12,
qty: 3,
brand_id: 12,
subtotal: '1050',
brand: 'Adidas',
color: 'White',
shoesize: 6,
price: '350',
quantity: 0 } ] }