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(
66
66
Methods ::PROMPTS_GET => method ( :get_prompt ) ,
67
67
Methods ::INITIALIZE => method ( :init ) ,
68
68
Methods ::PING => -> ( _ ) { { } } ,
69
- Methods ::NOTIFICATIONS_INITIALIZED => -> ( _ ) { { } } ,
69
+ Methods ::NOTIFICATIONS_INITIALIZED => -> ( _ ) { } ,
70
70
71
71
# No op handlers for currently unsupported methods
72
72
Methods ::RESOURCES_SUBSCRIBE => -> ( _ ) { } ,
Original file line number Diff line number Diff line change @@ -141,22 +141,23 @@ class ServerTest < ActiveSupport::TestCase
141
141
assert_instrumentation_data ( { method : "unsupported_method" } )
142
142
end
143
143
144
- test "#handle notifications/initialized returns empty response" do
144
+ test "#handle notifications/initialized returns nil response" do
145
145
request = {
146
146
jsonrpc : "2.0" ,
147
147
method : "notifications/initialized" ,
148
- id : "123" ,
149
148
}
150
149
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 )
160
161
assert_instrumentation_data ( { method : "notifications/initialized" } )
161
162
end
162
163
You can’t perform that action at this time.
0 commit comments