2014-11-20 11:29:32 +09:00
|
|
|
require "test_helper"
|
2010-04-20 23:05:11 +00:00
|
|
|
|
|
|
|
class JobTaskControllerTest < ActionController::TestCase
|
|
|
|
def test_all
|
2024-01-08 19:39:01 +09:00
|
|
|
job_task = JobTask.create(task_type: "mass_tag_edit", status: "pending", data: { "start" => "a", "result" => "b", "updater_id" => 1, "updater_ip_addr" => "127.0.0.1" })
|
2014-08-23 16:19:01 +09:00
|
|
|
|
2010-04-20 23:05:11 +00:00
|
|
|
assert_equal([], job_task.errors.full_messages)
|
2014-08-23 16:19:01 +09:00
|
|
|
|
2010-04-20 23:05:11 +00:00
|
|
|
get :index
|
|
|
|
assert_response :success
|
2014-08-23 16:19:01 +09:00
|
|
|
|
2024-01-08 19:39:01 +09:00
|
|
|
get :show, params: { id: job_task.id }, session: { user_id: 1 }
|
2010-04-20 23:05:11 +00:00
|
|
|
assert_response :success
|
2014-08-23 16:19:01 +09:00
|
|
|
|
2024-01-08 19:39:01 +09:00
|
|
|
get :restart, params: { id: job_task.id }, session: { user_id: 1 }
|
2010-04-20 23:05:11 +00:00
|
|
|
assert_response :success
|
|
|
|
end
|
|
|
|
end
|