From 817f170a62d9b55579d645a2bfd385c4b51e911c Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Mon, 25 Jan 2021 18:27:48 +0100 Subject: [PATCH] Check created record attributes --- test/system/targets_test.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/system/targets_test.rb b/test/system/targets_test.rb index a129082..085b620 100644 --- a/test/system/targets_test.rb +++ b/test/system/targets_test.rb @@ -75,7 +75,15 @@ class TargetsTest < BodyTrackingSystemTestCase click_on t(:button_create) end end - assert_equal @project1.goals.binding, Target.last.goal + + t = Target.last + assert_equal @project1.goals.binding, t.goal + assert_equal Date.current, t.effective_from + assert_equal '==', t.condition + assert_equal quantities(:quantities_energy), t.thresholds.first.quantity + assert_equal 1750, t.thresholds.first.value + assert_equal units(:units_kcal), t.thresholds.first.unit + assert_no_selector 'form#new-target-form' assert_selector 'table#targets tbody tr', count: @project1.targets.count end