Sha256: 219d99ceceeaa8b3e921e916ec53928f794641f536bcd1a3b1cfe0817c1c3bd7

Contents?: true

Size: 430 Bytes

Versions: 16

Compression:

Stored size: 430 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

16 entries across 16 versions & 1 rubygems

Version Path
shipit-engine-0.5.2 test/models/output_chunk_test.rb
shipit-engine-0.5.1 test/models/output_chunk_test.rb
shipit-engine-0.5.0 test/models/output_chunk_test.rb
shipit-engine-0.4.10 test/models/output_chunk_test.rb
shipit-engine-0.4.9 test/models/output_chunk_test.rb
shipit-engine-0.4.8 test/models/output_chunk_test.rb
shipit-engine-0.4.7 test/models/output_chunk_test.rb
shipit-engine-0.4.6 test/models/output_chunk_test.rb
shipit-engine-0.4.5 test/models/output_chunk_test.rb
shipit-engine-0.4.4 test/models/output_chunk_test.rb
shipit-engine-0.4.3 test/models/output_chunk_test.rb
shipit-engine-0.4.2 test/models/output_chunk_test.rb
shipit-engine-0.4.1 test/models/output_chunk_test.rb
shipit-engine-0.4.0 test/models/output_chunk_test.rb
shipit-engine-0.3.1 test/models/output_chunk_test.rb
shipit-engine-0.3.0 test/models/output_chunk_test.rb