Sha256: 84673dd651b154b44160adb38efb96ba17b85da689604fce10a58af54bd1306c

Contents?: true

Size: 633 Bytes

Versions: 7

Compression:

Stored size: 633 Bytes

Contents

require 'test_helper'

module Shipit
  class MarkDeployHealthyJobTest < ActiveSupport::TestCase
    setup do
      @job = MarkDeployHealthyJob.new
      @deploy = shipit_deploys(:canaries_validating)
    end

    test "#perform bails out if the deploy was marked as healthy or faulty" do
      @deploy.report_faulty!
      assert_no_difference -> { ReleaseStatus.count } do
        @job.perform(@deploy)
      end
    end

    test "#perform appends the new status if no other status was appended in the meantime" do
      assert_difference -> { ReleaseStatus.count }, +1 do
        @job.perform(@deploy)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
shipit-engine-0.31.0 test/jobs/mark_deploy_healthy_job_test.rb
shipit-engine-0.30.0 test/jobs/mark_deploy_healthy_job_test.rb
shipit-engine-0.29.0 test/jobs/mark_deploy_healthy_job_test.rb
shipit-engine-0.28.1 test/jobs/mark_deploy_healthy_job_test.rb
shipit-engine-0.28.0 test/jobs/mark_deploy_healthy_job_test.rb
shipit-engine-0.27.1 test/jobs/mark_deploy_healthy_job_test.rb
shipit-engine-0.27.0 test/jobs/mark_deploy_healthy_job_test.rb