Rename test directory from model_context_protocol to mcp
Follow-up to #24. The directory structure of the product code and test code is expected to match.
This commit is contained in:
parent
7ad1e904eb
commit
f33fe309b4
1 changed files with 0 additions and 0 deletions
|
|
@ -1,32 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
module MCP
|
||||
class Tool
|
||||
class InputSchemaTest < ActiveSupport::TestCase
|
||||
test "required arguments are converted to symbols" do
|
||||
input_schema = InputSchema.new(properties: { message: { type: "string" } }, required: ["message"])
|
||||
assert_equal [:message], input_schema.required
|
||||
end
|
||||
|
||||
test "to_h returns a hash representation of the input schema" do
|
||||
input_schema = InputSchema.new(properties: { message: { type: "string" } }, required: [:message])
|
||||
assert_equal(
|
||||
{ type: "object", properties: { message: { type: "string" } }, required: [:message] },
|
||||
input_schema.to_h,
|
||||
)
|
||||
end
|
||||
|
||||
test "missing_required_arguments returns an array of missing required arguments" do
|
||||
input_schema = InputSchema.new(properties: { message: { type: "string" } }, required: [:message])
|
||||
assert_equal [:message], input_schema.missing_required_arguments({})
|
||||
end
|
||||
|
||||
test "missing_required_arguments returns an empty array if no required arguments are missing" do
|
||||
input_schema = InputSchema.new(properties: { message: { type: "string" } }, required: [:message])
|
||||
assert_empty input_schema.missing_required_arguments({ message: "Hello, world!" })
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue