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.17.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.16.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.15.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.14.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.13.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.12.1 test/jobs/refresh_status_job_test.rb
shipit-engine-0.12.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.11.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.10.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.9.0 test/jobs/refresh_status_job_test.rb
shipit-engine-0.8.9 test/jobs/refresh_status_job_test.rb
shipit-engine-0.8.8 test/jobs/refresh_status_job_test.rb
shipit-engine-0.8.7 test/jobs/refresh_status_job_test.rb
shipit-engine-0.8.6 test/jobs/refresh_status_job_test.rb
shipit-engine-0.8.5 test/jobs/refresh_status_job_test.rb
shipit-engine-0.8.4 test/jobs/refresh_status_job_test.rb
shipit-engine-0.8.3 test/jobs/refresh_status_job_test.rb
shipit-engine-0.8.2 test/jobs/refresh_status_job_test.rb
shipit-engine-0.8.1 test/jobs/refresh_status_job_test.rb
shipit-engine-0.8.0 test/jobs/refresh_status_job_test.rb