test/unit/response_tests.rb in sanford-protocol-0.8.0 vs test/unit/response_tests.rb in sanford-protocol-0.9.0

- old
+ new

@@ -43,9 +43,20 @@ } assert_equal expected, subject.to_hash end + should "be comparable" do + match_response = Sanford::Protocol::Response.new( + subject.status.dup, + subject.data.dup + ) + assert_equal match_response, subject + + not_match_response = Sanford::Protocol::Response.new(123, {}) + assert_not_equal not_match_response, subject + end + end # Somewhat of a system test, want to make sure if Response is passed some # "fuzzy" args that it will build it's status object as expected class StatusBuildingTests < UnitTests