Sha256: b6de6847716af487d2df83bfe8fd3811026c4f079972390f2c12728e41f0cbfb

Contents?: true

Size: 593 Bytes

Versions: 2

Compression:

Stored size: 593 Bytes

Contents

# frozen_string_literal: true
require 'test_helper'

module Shipit
  module Api
    class OutputsControllerTest < ApiControllerTestCase
      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

2 entries across 2 versions & 1 rubygems

Version Path
shipit-engine-0.39.0 test/controllers/api/outputs_controller_test.rb
shipit-engine-0.38.0 test/controllers/api/outputs_controller_test.rb