Sha256: d2fbe7d6c70f73b1a9f9d2f7cfedcd5e540875408e9ede7a333b3e0a9509f2ba

Contents?: true

Size: 431 Bytes

Versions: 6

Compression:

Stored size: 431 Bytes

Contents

require 'test_helper'

class OutputChunkTest < ActiveSupport::TestCase
  def setup
    @deploy = deploys(:shipit)
    @chunks = 3.times.map { OutputChunk.create!(text: 'bla', task: @deploy) }
  end

  test "tail" do
    start = @chunks.first
    rest  = @chunks - [start]
    assert_equal rest, @deploy.chunks.tail(start.id)
  end

  test "tail without start" do
    assert_equal @deploy.chunks, @deploy.chunks.tail(nil)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shipit-engine-0.2.3 test/models/output_chunk_test.rb
shipit-engine-0.2.2 test/models/output_chunk_test.rb
shipit-engine-0.2.1 test/models/output_chunk_test.rb
shipit-engine-0.2.0 test/models/output_chunk_test.rb
shipit-engine-0.1.0 test/models/output_chunk_test.rb
shipit-engine-0.0.1.pre test/models/output_chunk_test.rb