diff options
| author | Teddy Wing | 2018-02-09 18:16:24 +0100 |
|---|---|---|
| committer | Teddy Wing | 2018-02-09 18:16:24 +0100 |
| commit | c259d7e3e24259e14b4756f181b3a8784d8d1919 (patch) | |
| tree | 6a4f684539c5c8e7eb09e3853732bee4b2592f07 /spec/support/shared_examples | |
| parent | 42cff5c818140b193eb90fbb40b31e8a0c708207 (diff) | |
| download | chouette-core-c259d7e3e24259e14b4756f181b3a8784d8d1919.tar.bz2 | |
route_base_spec.rb: Fix checksum test as a result of factory
* The factory already creates `StopPoint`s for us, so we don't need to
create any additional ones in the test. Previously this would give us
eight stop points instead of three or five.
* Update the checksum in the factory after generating stop points. We
need to do this because otherwise the checksum will be incorrect, not
taking into account the new stop points. Without this change, the
checksum starts out in an inconsistent state and causes the:
1) Chouette::Route checksum behaves like checksum support doesn't change the checksum on save if the source hasn't been changed
Failure/Error: expect(subject.checksum).to eq(checksum)
expected: "bc0e7b37243682904bd7013108258fdc744b03e0c59ed1a30e24e112a49242c1"
got: "b39d643fdd4f9d6ff62547750508af728a187de29a3d6e4295f9bb3d13559a51"
(compared using ==)
Shared Example Group: "checksum support" called from ./spec/models/chouette/route/route_base_spec.rb:5
# ./spec/support/checksum_support.rb:84:in `block (2 levels) in <top (required)>'
test to fail.
Refs #5416
Diffstat (limited to 'spec/support/shared_examples')
0 files changed, 0 insertions, 0 deletions
