2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-25 03:07:15 +00:00
moebooru/test/controllers/job_task_controller_test.rb

19 lines
575 B
Ruby
Raw Permalink Normal View History

require "test_helper"
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
assert_equal([], job_task.errors.full_messages)
2014-08-23 16:19:01 +09: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 }
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 }
assert_response :success
end
end