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(
74
74
Methods ::PROMPTS_GET => method ( :get_prompt ) ,
75
75
Methods ::INITIALIZE => method ( :init ) ,
76
76
Methods ::PING => -> ( _ ) { { } } ,
77
+ Methods ::NOTIFICATIONS_INITIALIZED => -> ( _ ) { } ,
77
78
78
79
# No op handlers for currently unsupported methods
79
80
Methods ::RESOURCES_SUBSCRIBE => -> ( _ ) { } ,
Original file line number Diff line number Diff line change @@ -160,6 +160,26 @@ class ServerTest < ActiveSupport::TestCase
160
160
assert_instrumentation_data ( { method : "unsupported_method" } )
161
161
end
162
162
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
+
163
183
test "#handle tools/list returns available tools" do
164
184
request = {
165
185
jsonrpc : "2.0" ,
You can’t perform that action at this time.
0 commit comments