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.8.10.2 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.10.1 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.9.11 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.10 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.9 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.8 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.7 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.6 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.5 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.4 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.3 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.2 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.1 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.8.0 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.19 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.18 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.17 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.16 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.15 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.7.14 flydata-core/spec/event/flydata_event_handler_registry_spec.rb