Merge branch '8784-dir-listings'
[arvados.git] / apps / workbench / test / controllers / jobs_controller_test.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 require 'test_helper'
6
7 class JobsControllerTest < ActionController::TestCase
8   test "visit jobs index page" do
9     get :index, {}, session_for(:active)
10     assert_response :success
11   end
12
13   test "job page lists pipelines and jobs in which it is used" do
14     get(:show,
15         {id: api_fixture('jobs')['completed_job_in_publicly_accessible_project']['uuid']},
16         session_for(:active))
17     assert_response :success
18
19     assert_select "div.used-in-pipelines" do
20       assert_select "a[href=/pipeline_instances/zzzzz-d1hrv-n68vc490mloy4fi]"
21     end
22
23     assert_select "div.used-in-jobs" do
24       assert_select "a[href=/jobs/zzzzz-8i9sb-with2components]"
25     end
26   end
27 end