assignment_test.rb 298 B

12345678910111213141516
  1. require 'test_helper'
  2. class AssignmentTest < ActiveSupport::TestCase
  3. def setup
  4. @assignment = assignments(:one)
  5. end
  6. test "should be valid" do
  7. assert @assignment.valid?
  8. end
  9. test "date should be present" do
  10. @assignment.due_at = nil
  11. assert_not @assignment.valid?
  12. end
  13. end