Sha256: c7a584aedce77b5803d421179d32e351ef5ddd4a9285226f0f42d573bd4e7455
Contents?: true
Size: 729 Bytes
Versions: 10
Compression:
Stored size: 729 Bytes
Contents
# frozen_string_literal: true require 'test_helper' module Shipit module Webhooks class HandlersTest < ActiveSupport::TestCase test 'custom handlers do not replace default shipit handlers' do event = 'push' mock_handler = mock Shipit::Webhooks.register_handler(event, mock_handler) assert_includes Shipit::Webhooks.for_event(event), mock_handler assert_includes Shipit::Webhooks.for_event(event), Shipit::Webhooks::Handlers::PushHandler Shipit::Webhooks.reset_handlers! end test "unknown events have no handlers" do event = '_' handlers = Shipit::Webhooks.for_event(event) assert_equal [], handlers end end end end
Version data entries
10 entries across 10 versions & 1 rubygems