Sha256: 3d0b486e641c7d6d1f8681e561f3745af24ddaebb2c62ae554f044f2f39ab42f

Contents?: true

Size: 820 Bytes

Versions: 12

Compression:

Stored size: 820 Bytes

Contents

require 'test_helper'
require 'time'

class ServerSideTest < ChilloutTestCase

  def setup
    @event_data_builder = mock("EventDataBuilder")
    @http_client = mock("HttpClient")
    @server_side = Chillout::ServerSide.new(@event_data_builder, @http_client)
  end

  def test_send_creations_use_event_data_builder
    @event_data_builder.expects(:build_from_creations_container).with(:creations_container, anything).returns(:event_data_from_builder)
    @http_client.stubs(:post)
    @server_side.send_creations(:creations_container)
  end

  def test_send_creations_use_http_client
    @event_data_builder.stubs(:build_from_creations_container).returns(:event_data_from_builder)
    @http_client.expects(:post).with('/metrics', :event_data_from_builder)
    @server_side.send_creations(:creations_container)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
chillout-0.8.2 test/server_side_test.rb
chillout-0.8.1 test/server_side_test.rb
chillout-0.8.0 test/server_side_test.rb
chillout-0.6.0 test/server_side_test.rb
chillout-0.5.4 test/server_side_test.rb
chillout-0.5.3 test/server_side_test.rb
chillout-0.5.2 test/server_side_test.rb
chillout-0.5.1 test/server_side_test.rb
chillout-0.5.0 test/server_side_test.rb
chillout-0.4.1 test/server_side_test.rb
chillout-0.4.0 test/server_side_test.rb
chillout-0.3.0 test/server_side_test.rb