Tweak assert_equal argument order in tests
The argument order for `assert_equal` is expected, actual: https://github.com/minitest/minitest/blob/v5.25.5/lib/minitest/assertions.rb#L214 This PR corrects the arguments that were reversed to the expected order. It also enables `Minitest/LiteralAsActualArgument`, which can detect and autocorrect some of these cases: https://docs.rubocop.org/rubocop-minitest/0.38/cops_minitest.html#minitestliteralasactualargument
This commit is contained in:
parent
022b3ff640
commit
ae5a41588e
1 changed files with 35 additions and 35 deletions
|
|
@ -413,14 +413,12 @@ module MCP
|
|||
io1.rewind
|
||||
output1 = io1.read
|
||||
# Session 1 should have received two notifications (one from each request since we broadcast)
|
||||
assert_equal 2,
|
||||
output1.scan(/data: {"jsonrpc":"2.0","method":"test_notification","params":{"session":"current"}}/).count
|
||||
assert_equal 2, output1.scan(/data: {"jsonrpc":"2.0","method":"test_notification","params":{"session":"current"}}/).count
|
||||
|
||||
io2.rewind
|
||||
output2 = io2.read
|
||||
# Session 2 should have received two notifications (one from each request since we broadcast)
|
||||
assert_equal 2,
|
||||
output2.scan(/data: {"jsonrpc":"2.0","method":"test_notification","params":{"session":"current"}}/).count
|
||||
assert_equal 2, output2.scan(/data: {"jsonrpc":"2.0","method":"test_notification","params":{"session":"current"}}/).count
|
||||
end
|
||||
|
||||
test "send_notification to specific session" do
|
||||
|
|
|
|||
Loading…
Reference in a new issue