Sha256: 81a72b2949f06edbcb1b480182fd12f0f2b2ca13622126aa2ddfdbc040e0abe7

Contents?: true

Size: 941 Bytes

Versions: 2

Compression:

Stored size: 941 Bytes

Contents

require 'test_helper'

class UprStatusTest < ActiveSupport::TestCase
  # Replace this with your real tests.
  test "start with length" do
    assert_kind_of UprStatus, UprStatus.start('abcde', 5)
  end

  test "start without length" do
    assert_kind_of UprStatus, UprStatus.start('abcde', nil)
  end

  test "incr from start" do
    assert_nothing_raised { UprStatus.incr('two', 2) }
    assert_equal 2, UprStatus.read('two').seen
  end

  test "errored" do
    assert UprStatus.read('errored').error?
  end

  test "errored incr no-op" do
    assert UprStatus.incr('errored', 6)
    assert UprStatus.read('errored').error?
  end

  test "finish" do
    assert_kind_of UprStatus, UprStatus.finish('two')
    assert UprStatus.read('two').done?
  end

  test "done?" do
    assert UprStatus.read('done').done?
  end

  test "error!" do
    assert_kind_of UprStatus, UprStatus.error!('two')
    assert UprStatus.read('two').error?
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
upr-0.3.0 examples/rails_app-2.3.4/test/unit/upr_status_test.rb
upr-0.2.0 examples/rails_app-2.3.4/test/unit/upr_status_test.rb