From 56e131af932102bc8458ab50c4aebb72a476228d Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Sun, 7 Mar 2021 15:19:40 +0100 Subject: [PATCH] Test pass: test_index_without_goals --- test/system/goals_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/system/goals_test.rb b/test/system/goals_test.rb index 6a76437..2b8730b 100644 --- a/test/system/goals_test.rb +++ b/test/system/goals_test.rb @@ -12,4 +12,12 @@ class GoalsTest < BodyTrackingSystemTestCase visit project_goals_path(@project1) assert_selector 'table#goals tbody tr', count: @project1.goals.count end + + def test_index_without_goals + @project1.goals.delete_all + assert_equal 0, @project1.goals.count + visit project_goals_path(@project1) + assert_current_path project_goals_path(@project1) + assert_selector 'div#goals', visible: :yes, exact_text: t(:label_no_data) + end end