API de comptabilité horaire.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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