diff --git a/test/bin/committee_stub_test.rb b/test/bin/committee_stub_test.rb index 9b61111b..d234497b 100644 --- a/test/bin/committee_stub_test.rb +++ b/test/bin/committee_stub_test.rb @@ -44,8 +44,6 @@ def app options = {} - # TODO: delete when 5.0.0 released because default value changed - options[:parse_response_by_content_type] = false @bin.get_app(hyper_schema, options) end diff --git a/test/middleware/base_test.rb b/test/middleware/base_test.rb index 446848ee..11d48d00 100644 --- a/test/middleware/base_test.rb +++ b/test/middleware/base_test.rb @@ -117,9 +117,6 @@ def app private def new_rack_app(options = {}) - # TODO: delete when 5.0.0 released because default value changed - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil - Rack::Builder.new { use Committee::Middleware::RequestValidation, options run lambda { |_| diff --git a/test/middleware/request_validation_open_api_3_test.rb b/test/middleware/request_validation_open_api_3_test.rb index 942a44ea..b9a8b5cb 100644 --- a/test/middleware/request_validation_open_api_3_test.rb +++ b/test/middleware/request_validation_open_api_3_test.rb @@ -615,9 +615,6 @@ def new_rack_app(options = {}) end def new_rack_app_with_lambda(check_lambda, options = {}) - # TODO: delete when 5.0.0 released because default value changed - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil - Rack::Builder.new { use Committee::Middleware::RequestValidation, options run check_lambda diff --git a/test/middleware/request_validation_test.rb b/test/middleware/request_validation_test.rb index 930647be..bd95cd77 100644 --- a/test/middleware/request_validation_test.rb +++ b/test/middleware/request_validation_test.rb @@ -505,9 +505,6 @@ def new_rack_app(options = {}) def new_rack_app_with_lambda(check_lambda, options = {}) - # TODO: delete when 5.0.0 released because default value changed - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil - Rack::Builder.new { use Committee::Middleware::RequestValidation, options run check_lambda diff --git a/test/middleware/response_validation_open_api_3_test.rb b/test/middleware/response_validation_open_api_3_test.rb index b0f06967..1f18cca9 100644 --- a/test/middleware/response_validation_open_api_3_test.rb +++ b/test/middleware/response_validation_open_api_3_test.rb @@ -273,9 +273,6 @@ def app private def new_response_rack(response, headers = {}, options = {}, rack_options = {}) - # TODO: delete when 5.0.0 released because default value changed - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil - status = rack_options[:status] || 200 content_type = rack_options[:content_type] || "application/json" headers = { diff --git a/test/middleware/response_validation_test.rb b/test/middleware/response_validation_test.rb index 17778f1e..3b0bde52 100644 --- a/test/middleware/response_validation_test.rb +++ b/test/middleware/response_validation_test.rb @@ -15,14 +15,6 @@ def app assert_equal 200, last_response.status end - # TODO: remove 5.0.0 - it "passes through a valid response" do - # will show deprecated message - @app = new_rack_app(JSON.generate([ValidApp]), {}, schema: hyper_schema, strict: true) - get "/apps" - assert_equal 200, last_response.status - end - it "doesn't call error_handler (has a arg) when response is valid" do called = false pr = ->(_e) { called = true } @@ -173,9 +165,6 @@ def app private def new_rack_app(response, headers = {}, options = {}) - # TODO: delete when 5.0.0 released because default value changed - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil - headers = { "Content-Type" => "application/json" }.merge(headers) diff --git a/test/middleware/stub_test.rb b/test/middleware/stub_test.rb index eb68cf7e..1360381d 100644 --- a/test/middleware/stub_test.rb +++ b/test/middleware/stub_test.rb @@ -113,9 +113,6 @@ def new_rack_app(options = {}) response = options.delete(:response) suppress = options.delete(:suppress) - # TODO: delete when 5.0.0 released because default value changed - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil - Rack::Builder.new { use Committee::Middleware::Stub, options run lambda { |env| diff --git a/test/schema_validator/hyper_schema/router_test.rb b/test/schema_validator/hyper_schema/router_test.rb index 5bb167ab..41798516 100644 --- a/test/schema_validator/hyper_schema/router_test.rb +++ b/test/schema_validator/hyper_schema/router_test.rb @@ -69,8 +69,6 @@ end def hyper_schema_router(options = {}) - # TODO: delete when 5.0.0 released because default value changed - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil schema = Committee::Drivers::HyperSchema::Driver.new.parse(hyper_schema_data) validator_option = Committee::SchemaValidator::Option.new(options, schema, :hyper_schema) @@ -78,8 +76,6 @@ def hyper_schema_router(options = {}) end def open_api_2_router(options = {}) - # TODO: delete when 5.0.0 released because default value changed - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil schema = Committee::Drivers::OpenAPI2::Driver.new.parse(open_api_2_data) validator_option = Committee::SchemaValidator::Option.new(options, schema, :hyper_schema) diff --git a/test/schema_validator/open_api_3/operation_wrapper_test.rb b/test/schema_validator/open_api_3/operation_wrapper_test.rb index 1b466850..0169b069 100644 --- a/test/schema_validator/open_api_3/operation_wrapper_test.rb +++ b/test/schema_validator/open_api_3/operation_wrapper_test.rb @@ -9,12 +9,7 @@ before do @path = '/validate' @method = 'post' - - # TODO: delete when 5.0.0 released because default value changed - options = {} - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil - - @validator_option = Committee::SchemaValidator::Option.new(options, open_api_3_schema, :open_api_3) + @validator_option = Committee::SchemaValidator::Option.new({}, open_api_3_schema, :open_api_3) end def operation_object diff --git a/test/schema_validator/open_api_3/request_validator_test.rb b/test/schema_validator/open_api_3/request_validator_test.rb index 1df37e40..49cdd679 100644 --- a/test/schema_validator/open_api_3/request_validator_test.rb +++ b/test/schema_validator/open_api_3/request_validator_test.rb @@ -96,9 +96,6 @@ def app end def new_rack_app(options = {}) - # TODO: delete when 5.0.0 released because default value changed - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil - Rack::Builder.new { use Committee::Middleware::RequestValidation, options run lambda { |_| diff --git a/test/schema_validator/open_api_3/response_validator_test.rb b/test/schema_validator/open_api_3/response_validator_test.rb index 84d96712..0c10c3b9 100644 --- a/test/schema_validator/open_api_3/response_validator_test.rb +++ b/test/schema_validator/open_api_3/response_validator_test.rb @@ -13,11 +13,7 @@ @path = '/validate' @method = 'post' - # TODO: delete when 5.0.0 released because default value changed - options = {} - options[:parse_response_by_content_type] = true if options[:parse_response_by_content_type] == nil - - @validator_option = Committee::SchemaValidator::Option.new(options, open_api_3_schema, :open_api_3) + @validator_option = Committee::SchemaValidator::Option.new({}, open_api_3_schema, :open_api_3) end it "passes through a valid response" do diff --git a/test/test/methods_new_version_test.rb b/test/test/methods_new_version_test.rb index 0b470d2d..1f1ac49d 100644 --- a/test/test/methods_new_version_test.rb +++ b/test/test/methods_new_version_test.rb @@ -30,9 +30,6 @@ def response_data @committee_schema = nil @committee_options = {schema: hyper_schema} - - # TODO: delete when 5.0.0 released because default value changed - @committee_options[:parse_response_by_content_type] = false end describe "#assert_schema_conform" do diff --git a/test/test/methods_test.rb b/test/test/methods_test.rb index 725ab592..a2755c10 100644 --- a/test/test/methods_test.rb +++ b/test/test/methods_test.rb @@ -29,9 +29,6 @@ def response_data @committee_router = nil @committee_schema = nil @committee_options = {} - - # TODO: delete when 5.0.0 released because default value changed - @committee_options[:parse_response_by_content_type] = true end describe "Hyper-Schema" do