From 2b92486b12607c919926325c23d7aa065e6fd785 Mon Sep 17 00:00:00 2001 From: dennis Date: Mon, 15 Jul 2024 15:01:51 -0400 Subject: [PATCH] fixed typo + added a committee member check --- test/controllers/gem_records_controller_test.rb | 2 +- test/system/students_test.rb | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/controllers/gem_records_controller_test.rb b/test/controllers/gem_records_controller_test.rb index 4a65ab2..79432b6 100644 --- a/test/controllers/gem_records_controller_test.rb +++ b/test/controllers/gem_records_controller_test.rb @@ -35,7 +35,7 @@ class GemRecordsControllerTest < ActionController::TestCase assert_template 'index', 'Index template should be displayed' end - should 'committee members included in gem records' + should 'committee members included in gem records' do gem_records = create_list(:gem_record, 5, eventtype: GemRecord::PHD_EXAM) gem_records.each do |record| create_list(:committee_member, 2, gem_record: record) diff --git a/test/system/students_test.rb b/test/system/students_test.rb index 68538b3..8401921 100644 --- a/test/system/students_test.rb +++ b/test/system/students_test.rb @@ -26,9 +26,11 @@ class StudentsTest < ApplicationSystemTestCase click_link(@gem_record.studentname) assert_selector "h6", text: "Committee Members" - @gem_record.committee_members.each do |committee_member| - assert_selector "p", text: committee_member.full_name - end + if @gem_record.committee_members.count > 1 + @gem_record.committee_members.each do |committee_member| + assert_selector "p", text: committee_member.full_name + end + end end