# frozen_string_literal: true require 'test_helper' class QuestionAttachmentsTest < ActionDispatch::IntegrationTest test "should show attachments on question" do auth_candidate candidates(:dawn) get question_path questions(:fed6) assert_response :success assert_select '.question-text', questions(:fed6).question assert_select "img[src=\"#{questions(:fed6).attachment}\"]" end test "should show attachments on summary" do auth_candidate candidates(:dawn) get summary_path assert_response :success assert_select "img[src=\"#{questions(:fed6).attachment}\"]" end test "should show attachments on review" do auth_reviewer get admin_result_path(candidates(:richard).test_hash) assert_response :success assert_select "img[src=\"#{questions(:fed6).attachment}\"]" end end