Sha256: 536e601b5df5af44c8f3695fb2dc054b9edb3c60098c026712f9f7ba1874b7bc

Contents?: true

Size: 598 Bytes

Versions: 7

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true
require 'test_helper'

module Shipit
  module Api
    class OutputsControllerTest < ActionController::TestCase
      setup do
        @stack = shipit_stacks(:shipit)
        authenticate!
      end

      test "#show returns the task output as plain text" do
        task = @stack.tasks.last
        task.write("dummy output")

        get :show, params: { stack_id: @stack.to_param, task_id: task.id }
        assert_response :ok
        assert_equal 'text/plain', response.media_type
        assert_equal task.chunk_output, response.body
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
shipit-engine-0.37.0 test/controllers/api/outputs_controller_test.rb
shipit-engine-0.36.1 test/controllers/api/outputs_controller_test.rb
shipit-engine-0.36.0 test/controllers/api/outputs_controller_test.rb
shipit-engine-0.35.1 test/controllers/api/outputs_controller_test.rb
shipit-engine-0.35.0 test/controllers/api/outputs_controller_test.rb
shipit-engine-0.34.0 test/controllers/api/outputs_controller_test.rb
shipit-engine-0.33.0 test/controllers/api/outputs_controller_test.rb