course_listings_controller_test.rb 499 Bytes
Newer Older
1 2
require 'test_helper'

Zac Wood's avatar
Zac Wood committed
3
class API::CourseListingsControllerTest < ActionDispatch::IntegrationTest
4 5 6
  # test 'should grab sections for course' do
  #   get course_listings_url course_id: courses(:cs112).id, semester_id: semesters(:fall2018).id
  #   assert_response :success
Zach Perkins's avatar
Zach Perkins committed
7

8 9
  #   listing_returned = JSON.parse @response.body
  #   assert listing_returned.size.positive?
Zach Perkins's avatar
Zach Perkins committed
10

11
  #   assert listing_returned[0].include?("sections")
Zach Perkins's avatar
Zach Perkins committed
12

13 14
  #   assert_equal(listing_returned[0]["sections"].length, 2)
  # end
15
end