fix: failing test

pull/8/head
Nelson Jovel 1 year ago
parent 0c661930e9
commit 2994cd8df9

@ -221,6 +221,8 @@ describe "overview/index" do
academic_year: @academic_year) academic_year: @academic_year)
@teacher_response_rate_presenter = ResponseRatePresenter.new(focus: :teacher, school: @school, @teacher_response_rate_presenter = ResponseRatePresenter.new(focus: :teacher, school: @school,
academic_year: @academic_year) academic_year: @academic_year)
@parent_response_rate_presenter = ResponseRatePresenter.new(focus: :parent, school: @school,
academic_year: @academic_year)
Respondent.create!(school: @school, academic_year: @academic_year, total_students: 40, total_teachers: 40) Respondent.create!(school: @school, academic_year: @academic_year, total_students: 40, total_teachers: 40)
ResponseRate.create!(subcategory: Subcategory.first, school: @school, academic_year: @academic_year, ResponseRate.create!(subcategory: Subcategory.first, school: @school, academic_year: @academic_year,
@ -229,7 +231,7 @@ describe "overview/index" do
assign(:category_presenters, Category.all.map { |category| CategoryPresenter.new(category:) }) assign(:category_presenters, Category.all.map { |category| CategoryPresenter.new(category:) })
render render
end end
it "shows the view with the parent button active" do it "shows the view with the parent button inactive" do
expect(subject.css("input[id='parent_btn'][checked='checked']").count).to eq 0 expect(subject.css("input[id='parent_btn'][checked='checked']").count).to eq 0
expect(subject.css("input[id='student_and_teacher_btn'][checked='checked']").count).to eq 0 expect(subject.css("input[id='student_and_teacher_btn'][checked='checked']").count).to eq 0
end end
@ -251,6 +253,8 @@ describe "overview/index" do
academic_year: @academic_year) academic_year: @academic_year)
@teacher_response_rate_presenter = ResponseRatePresenter.new(focus: :teacher, school: @school, @teacher_response_rate_presenter = ResponseRatePresenter.new(focus: :teacher, school: @school,
academic_year: @academic_year) academic_year: @academic_year)
@parent_response_rate_presenter = ResponseRatePresenter.new(focus: :parent, school: @school,
academic_year: @academic_year)
Respondent.create!(school: @school, academic_year: @academic_year, total_students: 40, total_teachers: 40) Respondent.create!(school: @school, academic_year: @academic_year, total_students: 40, total_teachers: 40)
ResponseRate.create!(subcategory: Subcategory.first, school: @school, academic_year: @academic_year, ResponseRate.create!(subcategory: Subcategory.first, school: @school, academic_year: @academic_year,

Loading…
Cancel
Save