lecture_test.rb 328 B

1234567891011121314151617
  1. require 'test_helper'
  2. class LectureTest < ActiveSupport::TestCase
  3. def setup
  4. @lecture = lectures(:one)
  5. end
  6. test "should be valid" do
  7. assert @lecture.valid?
  8. end
  9. test "dates should be in order" do
  10. @lecture.starts_at = 1.hours.ago
  11. @lecture.ends_at = 2.hours.ago
  12. assert_not @lecture.valid?
  13. end
  14. end