Test pass: test_update_swap_targets
New fixtures + test fixes
This commit is contained in:
21
test/fixtures/quantities.yml
vendored
21
test/fixtures/quantities.yml
vendored
@@ -20,11 +20,20 @@ quantities_proteins:
|
||||
name: Proteins
|
||||
description: Total amount of proteins
|
||||
|
||||
quantities_fats:
|
||||
<<: *DEFAULTS
|
||||
domain: diet
|
||||
lft: 5
|
||||
rgt: 6
|
||||
depth: 0
|
||||
name: Fats
|
||||
description: Total amount of fats
|
||||
|
||||
quantities_target_above:
|
||||
<<: *DEFAULTS
|
||||
domain: target
|
||||
lft: 5
|
||||
rgt: 8
|
||||
lft: 7
|
||||
rgt: 10
|
||||
depth: 0
|
||||
name: above
|
||||
description: Lower bound
|
||||
@@ -33,8 +42,8 @@ quantities_target_range:
|
||||
<<: *DEFAULTS
|
||||
parent: quantities_target_above
|
||||
domain: target
|
||||
lft: 6
|
||||
rgt: 7
|
||||
lft: 8
|
||||
rgt: 9
|
||||
depth: 1
|
||||
name: and below
|
||||
description: Range
|
||||
@@ -42,8 +51,8 @@ quantities_target_range:
|
||||
quantities_target_equal:
|
||||
<<: *DEFAULTS
|
||||
domain: target
|
||||
lft: 9
|
||||
rgt: 10
|
||||
lft: 11
|
||||
rgt: 12
|
||||
depth: 0
|
||||
name: equal
|
||||
description: Exact value
|
||||
|
||||
24
test/fixtures/quantity_values.yml
vendored
24
test/fixtures/quantity_values.yml
vendored
@@ -5,3 +5,27 @@ quantity_values_001:
|
||||
quantity: quantities_target_equal
|
||||
value: 2500
|
||||
unit: units_kcal
|
||||
|
||||
quantity_values_002:
|
||||
type: Threshold
|
||||
registry_type: Target
|
||||
registry: targets_02
|
||||
quantity: quantities_target_above
|
||||
value: 20
|
||||
unit: units_gram
|
||||
|
||||
quantity_values_003:
|
||||
type: Threshold
|
||||
registry_type: Target
|
||||
registry: targets_02
|
||||
quantity: quantities_target_range
|
||||
value: 30
|
||||
unit: units_gram
|
||||
|
||||
quantity_values_004:
|
||||
type: Threshold
|
||||
registry_type: Target
|
||||
registry: targets_03
|
||||
quantity: quantities_target_above
|
||||
value: 1900
|
||||
unit: units_kcal
|
||||
|
||||
10
test/fixtures/targets.yml
vendored
10
test/fixtures/targets.yml
vendored
@@ -2,3 +2,13 @@ targets_01:
|
||||
goal: goals_binding
|
||||
quantity: quantities_energy
|
||||
effective_from: <%= 1.week.ago.to_s(:db) %>
|
||||
|
||||
targets_02:
|
||||
goal: goals_binding
|
||||
quantity: quantities_proteins
|
||||
effective_from: <%= 1.week.ago.to_s(:db) %>
|
||||
|
||||
targets_03:
|
||||
goal: goals_binding
|
||||
quantity: quantities_energy
|
||||
effective_from: <%= 2.days.ago.to_s(:db) %>
|
||||
|
||||
Reference in New Issue
Block a user