courses_controller_test.rb 394 Bytes
Newer Older
Zac Wood's avatar
Zac Wood committed
1 2 3
require 'test_helper'

class CoursesControllerTest < ActionDispatch::IntegrationTest
4 5 6 7 8 9
  test "sets course correctly" do
    c = courses(:cs112)
    get course_path id: c.id, semester_id: semesters(:fall2018).id
    assert_response :success

    # assert every course section is displayed
10
    assert_select '.section-item', c.course_sections.where(semester: semesters(:fall2018)).count
11
  end
Zac Wood's avatar
Zac Wood committed
12
end