Sha256: 4693f99c71e5abd10d40ad2bc11d820ec65ec2e1e11b98bb6b9db4e0c83a275c
Contents?: true
Size: 875 Bytes
Versions: 2
Compression:
Stored size: 875 Bytes
Contents
require 'test_helper' class ChunksControllerTest < ActionController::TestCase setup do @stack = stacks(:shipit) @deploy = deploys(:shipit) @last_chunk = @deploy.chunks.last session[:user_id] = users(:walrus).id end test ":index is success" do get :index, stack_id: @stack.to_param, task_id: @deploy.id, format: :json assert_response :success assert_equal @deploy.chunks.to_json, @response.body end test ":index with last_id" do get :index, stack_id: @stack.to_param, task_id: @deploy.id, last_id: @last_chunk.id, format: :json assert_response :success assert_equal '[]', @response.body end test ":tail" do get :tail, stack_id: @stack.to_param, task_id: @deploy.id, last_id: @last_chunk.id, format: :json assert_response :success assert_equal %w(url task chunks), JSON.parse(@response.body).keys end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shipit-engine-0.1.0 | test/controllers/chunks_controller_test.rb |
shipit-engine-0.0.1.pre | test/controllers/chunks_controller_test.rb |