API de comptabilité horaire.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

task_test.rb 458B

123456789101112131415161718
  1. require "test_helper"
  2. class TaskTest < ActiveSupport::TestCase
  3. setup do
  4. @user = users(:one)
  5. @activity = activities(:one)
  6. end
  7. test "task should be valid" do
  8. task = Task.new(name: "Write", description: "Write a new line", user_id: @user.id, activity_id: @activity.id)
  9. assert task.valid?
  10. end
  11. test "task should not be valid" do
  12. task = Task.new(name: "Write", description: "Write a new line")
  13. assert_not task.valid?
  14. end
  15. end