Merge branch 'master' into 9372-container-display
[arvados.git] / services / api / test / unit / job_task_test.rb
1 require 'test_helper'
2
3 class JobTaskTest < ActiveSupport::TestCase
4   test "new tasks get an assigned qsequence" do
5     set_user_from_auth :active
6     task = JobTask.create
7     assert_not_nil task.qsequence
8     assert_operator(task.qsequence, :>=, 0)
9   end
10
11   test "assigned qsequence is not overwritten" do
12     set_user_from_auth :active
13     task = JobTask.create!(qsequence: 99)
14     assert_equal(99, task.qsequence)
15   end
16 end