Sha256: 48632ea5db9bb2f0d0037a4ece67c6f0e76ee539ce7b0940bec423897e2ef7dc

Contents?: true

Size: 1019 Bytes

Versions: 51

Compression:

Stored size: 1019 Bytes

Contents

require 'spec_helper'
require 'flydata-core/event/flydata_event_handler_registry'
require 'event/shared_event'


module FlydataCore
  module Event
    describe FlydataEventHandlerRegistry do

      describe "#handlers" do
        context "with event that has specific handlers" do
          it "it returns correct hanlders" do
            handlers = FlydataEventHandlerRegistry.handlers("test", "testing")
            expect(handlers.size).to eql(2)
          end
        end
        context "with event that has specific handlers" do
          it "it returns correct hanlders case-1" do
            handlers = FlydataEventHandlerRegistry.handlers("test2", "testing")
            expect(handlers.size).to eql(2)
          end
          it "it returns any hanlders for unknown verb" do
            handlers = FlydataEventHandlerRegistry.handlers("test2", "abcd")
            expect(handlers.size).to eql(1)
            expect(handlers.to_a()[0]).to be(AnyHandler)
          end
        end

      end

    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
flydata-0.7.13 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.12 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.11 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.10 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.9 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.8 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.7 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.6 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.5 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.4 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.2.1 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.2 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.1 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.0 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.14 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.13 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.12 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.11 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.10 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.9 flydata-core/spec/event/flydata_event_handler_registry_spec.rb