aboutsummaryrefslogtreecommitdiffstats
path: root/app/javascript
diff options
context:
space:
mode:
authorTeddy Wing2017-11-29 15:56:42 +0100
committerTeddy Wing2017-11-29 15:56:42 +0100
commit7ebc710729081119da4a69472c7fd1dd3dfd58d8 (patch)
tree753b20468505fda369e2708e514bb2ba5fdc7578 /app/javascript
parent77c7751694feae5c4b7d119d1d5e6134307909cc (diff)
downloadchouette-core-7ebc710729081119da4a69472c7fd1dd3dfd58d8.tar.bz2
referential_spec(duplicate referential): Validate existing behaviour
Change bits of the test to validate that when saving duplicate `Referential`s synchronously, the second one fails to be saved. A few things needed to be changed since the last commit in order to get this test working: * Most crucially: The `metadata_1.save` lines needed to be removed. The metadata is indended to be saved at the same time as the `Referential`s. Otherwise, the validation doesn't work the way it should. * `create` the workbench in order to be able to associate it with the new referentials. * Explicitly set the referential organisation to the workbench organisation to pass validation that they both refer to the same organisation. * Explicitly make the `has_many` association of the metadata objects to referentials. * Since the second referential doesn't get saved when the spec passes, no schema is created for it. Thus our previous `Apartment` `drop` call failed for the second schema. To cover our bases for when the test both fails and passes, check if the referentials were persisted as a way of knowing whether the schema exists before trying to remove it. Refs #5024
Diffstat (limited to 'app/javascript')
0 files changed, 0 insertions, 0 deletions