Skip to main content

fixture_id

Function fixture_id 

Source
pub fn fixture_id(label: &str) -> i64
Expand description

The id of the fixture labelled label (Rails’ users(:david).id): the loader of tests/fixtures/*.yml gives a record without an explicit id the CRC-32 of its label modulo 2^30 - 1, like Rails.

§Examples

assert_eq!(ocre::testing::fixture_id("david"), 127326141);