File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed
Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def initialize(
6666 Methods ::PROMPTS_GET => method ( :get_prompt ) ,
6767 Methods ::INITIALIZE => method ( :init ) ,
6868 Methods ::PING => -> ( _ ) { { } } ,
69- Methods ::NOTIFICATIONS_INITIALIZED => -> ( _ ) { { } } ,
69+ Methods ::NOTIFICATIONS_INITIALIZED => -> ( _ ) { } ,
7070
7171 # No op handlers for currently unsupported methods
7272 Methods ::RESOURCES_SUBSCRIBE => -> ( _ ) { } ,
Original file line number Diff line number Diff line change @@ -141,22 +141,23 @@ class ServerTest < ActiveSupport::TestCase
141141 assert_instrumentation_data ( { method : "unsupported_method" } )
142142 end
143143
144- test "#handle notifications/initialized returns empty response" do
144+ test "#handle notifications/initialized returns nil response" do
145145 request = {
146146 jsonrpc : "2.0" ,
147147 method : "notifications/initialized" ,
148- id : "123" ,
149148 }
150149
151- response = @server . handle ( request )
152- assert_equal (
153- {
154- jsonrpc : "2.0" ,
155- id : "123" ,
156- result : { } ,
157- } ,
158- response ,
159- )
150+ assert_nil @server . handle ( request )
151+ assert_instrumentation_data ( { method : "notifications/initialized" } )
152+ end
153+
154+ test "#handle_json notifications/initialized returns nil response" do
155+ request = JSON . generate ( {
156+ jsonrpc : "2.0" ,
157+ method : "notifications/initialized" ,
158+ } )
159+
160+ assert_nil @server . handle_json ( request )
160161 assert_instrumentation_data ( { method : "notifications/initialized" } )
161162 end
162163
You can’t perform that action at this time.
0 commit comments