Use hexadecimal checksum
The problem is that 'my_checksum' is converted internally into a hexadecimal sha - both in rails4 and rails5 `my_checksum` is converted ans saved as `62fc1ec4ce60`. The difference is that in rails 4 `repository_verification_checksum` is stored as '62fc1ec4ce60' on record save, but loaded instance of `RepositoryState` has `repository_verification_checksum` stil lset to `my_checksum`. Reloading the record loads the saved value of course. In rails 5 `repository_verification_checksum` attribute of loaded instance is updated on record save (not sure what has changed internally but it seems that the test was passing only because the record was not reloaded because different checksum is actually stored in database. This patch updates the test to use real hexadecimal checksum which is also closer to real usage.
Showing
Please register or sign in to comment