diff options
| author | Teddy Wing | 2017-11-29 15:56:42 +0100 |
|---|---|---|
| committer | Teddy Wing | 2017-11-29 15:56:42 +0100 |
| commit | 7ebc710729081119da4a69472c7fd1dd3dfd58d8 (patch) | |
| tree | 753b20468505fda369e2708e514bb2ba5fdc7578 /app/javascript | |
| parent | 77c7751694feae5c4b7d119d1d5e6134307909cc (diff) | |
| download | chouette-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
