Sha256: 9ab19598fcfb1429379e95ae6fe44fad26bc51d4b33d4e2aaefd499766eedc0d

Contents?: true

Size: 742 Bytes

Versions: 36

Compression:

Stored size: 742 Bytes

Contents

require 'test_helper'
require 'tmpdir'

module Shipit
  class CacheDeploySpecJobTest < ActiveSupport::TestCase
    setup do
      @stack = shipit_stacks(:shipit)
      @last_commit = shipit_commits(:fifth)
      @job = CacheDeploySpecJob.new
    end

    test "#perform checkout the repository to the last recorded commit and cache the deploy spec" do
      @stack.update!(cached_deploy_spec: DeploySpec.new('review' => {'checklist' => %w(foo bar)}))

      dir = Pathname(Dir.tmpdir)
      StackCommands.any_instance.expects(:with_temporary_working_directory).with(commit: @last_commit).yields(dir)

      assert_equal %w(foo bar), @stack.checklist
      @job.perform(@stack)
      assert_equal [], @stack.reload.checklist
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
shipit-engine-0.24.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.23.1 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.23.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.22.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.21.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.20.1 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.20.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.19.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.18.1 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.18.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.17.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.16.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.15.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.14.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.13.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.12.1 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.12.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.11.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.10.0 test/jobs/cache_deploy_spec_job_test.rb
shipit-engine-0.9.0 test/jobs/cache_deploy_spec_job_test.rb