|
42 | 42 | create(:line_item, item: infant_disposable_kit_item) |
43 | 43 | ]) |
44 | 44 |
|
45 | | - create(:item, name: "Kit 1", kit: kit_1, organization:) |
46 | | - create(:item, name: "Kit 2", kit: kit_2, organization:) |
| 45 | + create(:item, name: "Kit 1", kit: kit_1, organization:, distribution_quantity: 1) |
| 46 | + create(:item, name: "Kit 2", kit: kit_2, organization:, distribution_quantity: 1) |
47 | 47 |
|
48 | 48 | # Distributions |
49 | 49 | distributions = create_list(:distribution, 2, issued_at: within_time, organization: organization) |
|
65 | 65 | expect(report).to eq({ |
66 | 66 | name: 'Children Served', |
67 | 67 | entries: { |
68 | | - 'Average children served monthly' => "8.42", |
69 | | - 'Total children served' => "101", |
| 68 | + 'Average children served monthly' => "10.0", |
| 69 | + 'Total children served' => "120", # 100 normal and 20 from kits |
70 | 70 | 'Repackages diapers?' => 'Y', |
71 | 71 | 'Monthly diaper distributions?' => 'Y' |
72 | 72 | } |
|
94 | 94 | create(:line_item, item: infant_disposable_kit_item) |
95 | 95 | ]) |
96 | 96 |
|
97 | | - create(:item, name: "Kit 1", kit:, organization:) |
| 97 | + create(:item, name: "Kit 1", kit:, organization:, distribution_quantity: 1) |
98 | 98 |
|
99 | 99 | # Distributions |
100 | 100 | distributions = create_list(:distribution, 2, issued_at: within_time, organization: organization) |
|
114 | 114 | expect(report).to eq({ |
115 | 115 | name: 'Children Served', |
116 | 116 | entries: { |
117 | | - 'Average children served monthly' => "3.42", |
118 | | - 'Total children served' => "41", |
| 117 | + 'Average children served monthly' => "5.0", |
| 118 | + 'Total children served' => "60", # 40 normal and 20 from kits |
119 | 119 | 'Repackages diapers?' => 'Y', |
120 | 120 | 'Monthly diaper distributions?' => 'Y' |
121 | 121 | } |
|
0 commit comments