File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ def initialize(
7474 Methods ::PROMPTS_GET => method ( :get_prompt ) ,
7575 Methods ::INITIALIZE => method ( :init ) ,
7676 Methods ::PING => -> ( _ ) { { } } ,
77+ Methods ::NOTIFICATIONS_INITIALIZED => -> ( _ ) { } ,
7778
7879 # No op handlers for currently unsupported methods
7980 Methods ::RESOURCES_SUBSCRIBE => -> ( _ ) { } ,
Original file line number Diff line number Diff line change @@ -160,6 +160,26 @@ class ServerTest < ActiveSupport::TestCase
160160 assert_instrumentation_data ( { method : "unsupported_method" } )
161161 end
162162
163+ test "#handle notifications/initialized returns nil response" do
164+ request = {
165+ jsonrpc : "2.0" ,
166+ method : "notifications/initialized" ,
167+ }
168+
169+ assert_nil @server . handle ( request )
170+ assert_instrumentation_data ( { method : "notifications/initialized" } )
171+ end
172+
173+ test "#handle_json notifications/initialized returns nil response" do
174+ request = JSON . generate ( {
175+ jsonrpc : "2.0" ,
176+ method : "notifications/initialized" ,
177+ } )
178+
179+ assert_nil @server . handle_json ( request )
180+ assert_instrumentation_data ( { method : "notifications/initialized" } )
181+ end
182+
163183 test "#handle tools/list returns available tools" do
164184 request = {
165185 jsonrpc : "2.0" ,
You can’t perform that action at this time.
0 commit comments