Sha256: c1e6489c0f9e3f2f0dcdeda1687f4cff1073d74c0ff0ac9b7a8708a46b5b916a

Contents?: true

Size: 755 Bytes

Versions: 16

Compression:

Stored size: 755 Bytes

Contents

require 'helper'

class TestStatusUpdateRequest < Test::Unit::TestCase
  should "Test update status request methods" do
    posting = Posting.new(:externalID => "1234567890", :source => '3TAPS')
    assert_equal "source:'3TAPS', externalID:1234567890", posting.to_json_for_status_client
    assert_equal StatusUpdateRequest, posting.status.class
    assert_equal Array, posting.status.errors.class
    assert_equal Hash, posting.status.attributes.class

    error = Message.from_hash(:code => 666, :message => "UFO posting error")
    posting.status.errors << error
    posting.status.attributes = {:postKey => "TESTKEY", :message => "UFO test message"}
    posting.status.event = 'lost'
    assert_equal String, posting.status.to_params.class
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
threetaps-client-1.0.14 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.13 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.12 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.11 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.10 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.9 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.8 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.7 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.6 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.5 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.4 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.3 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.2 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.1 test/dto/status/test_status_update_request.rb
threetaps-client-1.0.0 test/dto/status/test_status_update_request.rb
threetaps-client-0.5.1 test/dto/status/test_status_update_request.rb