Sha256: 37cdd79689738a53b47b256025126d5d2ef4024657e420dac51791b9a409e505

Contents?: true

Size: 678 Bytes

Versions: 1

Compression:

Stored size: 678 Bytes

Contents

require 'spec_helper'
require 'support/active_record'

describe Artifact::Log do
  include Support::ActiveRecord

  describe ".append" do
    let(:job) { Factory.create(:test, :log => Factory.create(:log, :content => '')) }

    it "appends streamed build log chunks" do
      lines = [
        "$ git clone --depth=1000 --quiet git://github.com/intridea/omniauth.git ~/builds/intridea/omniauth\n",
        "$ git checkout -qf 662af2708525b776aac580b10cc903ba66050e06\n",
        "$ bundle install --pa"
      ]
      0.upto(2) do |ix|
        Artifact::Log.append(job.id, lines[ix])
        lines[0, ix + 1].join.should eql(job.reload.log.content)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
travis-core-0.0.1 spec/travis/model/artifact/log_spec.rb