1
0

Added is_binding attribute to Goal

Fixed test_index to check for data rows only
This commit is contained in:
cryptogopher
2020-08-18 17:40:46 +02:00
parent 955125b843
commit 59a14043c8
13 changed files with 43 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
exposures_01:
view_type: Goal
view_id: <%= Project.find(1).goals.binding.id %>
view: goals_binding
quantity: quantities_energy

4
test/fixtures/goals.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
goals_binding:
project_id: 1
is_binding: true
name: '- binding -'

View File

@@ -1,5 +1,5 @@
quantities_energy:
project: projects_001
project_id: 1
domain: diet
parent: null
lft: 1

View File

@@ -1,4 +1,4 @@
targets_01:
goal_id: <%= Project.find(1).goals.binding.id %>
goal: goals_binding
condition: '=='
effective_from: <%= 1.week.ago.to_s(:db) %>

View File

@@ -1,14 +1,14 @@
units_gram:
project: projects_001
project_id: 1
name: 'gram'
shortname: 'g'
units_percent:
project: projects_001
project_id: 1
name: 'percent'
shortname: '%'
units_kcal:
project: projects_001
project_id: 1
name: 'kilocalorie'
shortname: 'kcal'