Sha256: aaca716e76114e2e7d5db20a610fe0152b819092e8d2945e679752f0782b1a2e

Contents?: true

Size: 815 Bytes

Versions: 10

Compression:

Stored size: 815 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class ServiceTest < Test::Unit::TestCase
  
      # A service that does nothing!
      class DummyService < Service
        def handle(request)
          return request.dispatched(self, true)
        end
      end      
  
    def setup
      @dummy_config =  {"priority" => 1}
      @umlaut_request = requests(:simple_request)
    end

    def test_write_to_session

      
      writer = DummyService.new( @dummy_config )
      writer.request = @umlaut_request
      writer.update_session( { :one => "first", :two => "second" })

      reader = DummyService.new( @dummy_config )
      reader.request = @umlaut_request
      session = reader.session()

      assert_equal "first", session[:one]
      assert_equal "second", session[:two]
      
    end
    
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
umlaut-3.0.0alpha10 ./test/unit/service_test.rb
umlaut-3.0.0alpha9 ./test/unit/service_test.rb
umlaut-3.0.0alpha8 ./test/unit/service_test.rb
umlaut-3.0.0alpha7 ./test/unit/service_test.rb
umlaut-3.0.0alpha6 ./test/unit/service_test.rb
umlaut-3.0.0alpha5 ./test/unit/service_test.rb
umlaut-3.0.0alpha4 ./test/unit/service_test.rb
umlaut-3.0.0alpha3 ./test/unit/service_test.rb
umlaut-3.0.0alpha2 test/unit/service_test.rb
umlaut-3.0.0alpha1 test/unit/service_test.rb