3 class ContainerRequestsControllerTest < ActionController::TestCase
4 test "visit completed container request log tab" do
7 cr = api_fixture('container_requests')['completed']
8 container_uuid = cr['container_uuid']
9 container = Container.find(container_uuid)
11 get :show, {id: cr['uuid'], tab_pane: 'Log'}, session_for(:active)
12 assert_response :success
14 assert_select "a", {:href=>"/collections/#{container['log']}", :text=>"Download the log"}
15 assert_select "a", {:href=>"#{container['log']}/baz"}
16 assert_not_includes @response.body, '<div id="event_log_div"'
19 test "visit running container request log tab" do
22 cr = api_fixture('container_requests')['running']
23 container_uuid = cr['container_uuid']
24 container = Container.find(container_uuid)
26 get :show, {id: cr['uuid'], tab_pane: 'Log'}, session_for(:active)
27 assert_response :success
29 assert_includes @response.body, '<div id="event_log_div"'
30 assert_select 'Download the log', false