Sha256: ac757368a4ab73e6351a15b44ac830da7a3857afaa4d2a54e72764d5f0e934c7

Contents?: true

Size: 636 Bytes

Versions: 46

Compression:

Stored size: 636 Bytes

Contents

require 'test_helper'

module Shipit
  class RefreshStatusesJobTest < ActiveSupport::TestCase
    setup do
      @stack = shipit_stacks(:shipit)
      @job = RefreshStatusesJob.new
    end

    test "#perform call #refresh_statuses! on the last 30 commits of the stack" do
      Commit.any_instance.expects(:refresh_statuses!).times(@stack.commits.count)

      @job.perform(stack_id: @stack.id)
    end

    test "if :commit_id param is present only this commit is refreshed" do
      Commit.any_instance.expects(:refresh_statuses!).once

      @job.perform(stack_id: @stack.id, commit_id: shipit_commits(:first).id)
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
shipit-engine-0.31.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.30.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.29.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.28.1 test/jobs/refresh_status_job_test.rb
shipit-engine-0.28.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.27.1 test/jobs/refresh_status_job_test.rb
shipit-engine-0.27.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.26.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.25.1 test/jobs/refresh_status_job_test.rb
shipit-engine-0.25.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.24.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.23.1 test/jobs/refresh_status_job_test.rb
shipit-engine-0.23.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.22.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.21.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.20.1 test/jobs/refresh_status_job_test.rb
shipit-engine-0.20.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.19.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.18.1 test/jobs/refresh_status_job_test.rb
shipit-engine-0.18.0 test/jobs/refresh_status_job_test.rb