Skip to content

False-positive diff change when comparing a large hash #100

Closed
@khiav223577

Description

@khiav223577

There should not have "inspection_doctor" in diff in that they are the same both in expected and in actual.

See the screenshots:
螢幕擷取畫面 2020-10-08 152315
螢幕擷取畫面 2020-10-08 152312

This is the test cases:

it do
  expect_response_header(:ok)
  expect(response_data).to eq(
    "items_count" => 2,
    "max_page"    => 1,
    "elements"    => [
      {
        "id"                        => target_specimens[0].id,
        "kind"                      => "lithium_heparin",
        "number"                    => "107-HEP-0001",
        "patient_medical_record_no" => "MED_0077",
        "patient_name"              => nil,
        "patient_id_card"           => nil,
        "patient_gender"            => nil,
        "patient_birthday"          => "1991-03-12",
        "patient_hospital"          => nil,
        "family_hospital"           => nil,
        "family_medical_record_no"  => nil,
        "family_title"              => nil,
        "inspect_date"              => nil,
        "submit_date"               => nil,
        "receive_date"              => "2017-06-01",
        "inspection_unit"           => nil,
        "inspection_doctor"         => nil,
        "description"               => nil,
        "disease"                   => nil,
        "REQ"                       => nil,
        "comments"                  => nil,
        "discarded_at"              => "2018-07-03 08:12:54"
      },
      {
        "id"                          => target_specimens[1].id,
        "kind"                        => "urine",
        "number"                      => "107-URN-0001",
        "patient_medical_record_no"   => "MED_3527",
        "patient_name"                => nil,
        "patient_id_card"             => nil,
        "patient_gender"              => nil,
        "patient_birthday"            => "1993-07-18",
        "patient_hospital"            => nil,
        "family_hospital"             => nil,
        "family_medical_record_no"    => nil,
        "family_title"                => nil,
        "inspect_date"                => nil,
        "submit_date"                 => nil,
        "receive_date"                => "2017-06-08",
        "inspection_unit"             => nil,
        "inspection_doctor"           => "unknown",
        # "inspection_doctor_unmatched" => true,
        "description"                 => nil,
        "disease"                     => nil,
        "REQ"                         => nil,
        "comments"                    => nil,
        "discarded_at"                => "2018-07-03 08:12:54"
      }
    ]
  )
end

Environment

super_diff (0.5.2)
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
Rails 5.2.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions