aboutsummaryrefslogtreecommitdiffstats
path: root/spec/javascript/time_table
diff options
context:
space:
mode:
authorTeddy Wing2017-12-13 16:16:44 +0100
committerTeddy Wing2017-12-13 16:16:44 +0100
commit985d9a673a79f2b304119999dc76d418225332c7 (patch)
tree668472879a44dcfab70d895707058eca251fb255 /spec/javascript/time_table
parentc21bcff5849190d87a2f2869a0f4714de118cb15 (diff)
downloadchouette-core-985d9a673a79f2b304119999dc76d418225332c7.tar.bz2
spec/support/referential: Eliminate data errors in truncation tests
After the first `truncation: true` test ran, all tables would be cleared. This caused errors as our tests rely on a referential like this existing: Referential.create(name: 'first') It also caused problems with `LineReferential` as the `:chouette_line` factory depends on an existing `LineReferential` associated to the `first` Referential. Add the `referentials` and `line_referentials` tables to the exclusion list when truncating so these tables don't get cleared and the 'first' records persist across test runs like before. To prevent errors trying to unnecessarily switch to the 'first' referential in `truncation: true` tests, disable that functionality by adding a filter to exclude these tests from the normal transactional `before(:each)` config block. Refs #5024
Diffstat (limited to 'spec/javascript/time_table')
0 files changed, 0 insertions, 0 deletions