Sha256: 96c49182a5714136e63b2f8126fe502c5b197f9ffc92be065d3a8c458c312195

Contents?: true

Size: 671 Bytes

Versions: 8

Compression:

Stored size: 671 Bytes

Contents

require 'test_helper'

class DispatcherTest < ChilloutTestCase
  def test_send_creations
    server_side = mock("ServerSide")
    server_side.expects(:send_creations).with(:creations)

    dispatcher = Chillout::Dispatcher.new(server_side)
    dispatcher.send_creations(:creations)
  end

  def test_send_creations_raise_exception_if_server_side_failed_to_send_request
    server_side = stub()
    server_side.stubs(:send_creations).raises(Chillout::HttpClient::NotSent.new(:http_error))

    dispatcher = Chillout::Dispatcher.new(server_side)

    assert_raises Chillout::Dispatcher::SendCreationsFailed do
      dispatcher.send_creations(:creations)
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
chillout-0.8.2 test/dispatcher_test.rb
chillout-0.8.1 test/dispatcher_test.rb
chillout-0.8.0 test/dispatcher_test.rb
chillout-0.6.0 test/dispatcher_test.rb
chillout-0.5.4 test/dispatcher_test.rb
chillout-0.5.3 test/dispatcher_test.rb
chillout-0.5.2 test/dispatcher_test.rb
chillout-0.5.1 test/dispatcher_test.rb