| Age | Commit message (Collapse) | Author |
|
Refs #6258 @1
|
|
Note: Did not fix the missing workgroup in the calendar mailer
|
|
5024-prevent-duplicate-referentials-from-being-created-during-parallel-db-transactions--rb201711271659
|
|
- CR change from #5006, severity of zip file messages :warning -> :error
- View specs for showing import_messages
|
|
Since the tests I was trying to use `truncation` for are now skipped,
remove these exceptions and revert this line back to what it was before
all this mess.
Refs #5024
|
|
The `truncation: true` strategy wasn't sticking. The config `before`
block only ran once for this test file. Instead of attaching the filter
to the `it` blocks, put it on the `context`. This correctly gets each
test to run in a transaction.
Remove the `truncation: false` filter I had added previously as this
didn't do what I wanted it to: it prevented the `before` block from
running instead of filtering out tests with `truncation: true`.
Refs #5024
|
|
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
|
|
This `before` hook allows tests to use the "truncation" database cleanup
strategy. It doesn't do anything explicitly JavaScript-related. Rather,
it was named JS because it was intended to be used for feature tests
with JavaScript. However, now that I need to use it for a couple tests
in `spec/models/referential_spec.rb`, the `:js` name doesn't make sense.
Rename the filter to something that says what it does, not how it should
be used.
Refs #5024
|
|
We now always use modules for namespaces
=> same structure for models, decorators, policies...
|
|
Instead of creating the objects directly in ActiveRecord, use our
existing factories for these records as suggested by Robert.
Refs #3520
|
|
Since the `output` attribute is now initialised automatically in the
`Workbench#initialize_output` `before_validation` callback, the one I
added here before I created the callback can be removed. Instead we'll
rely on the callback to create a new `ReferentialSuite` for us.
Refs #3520
|
|
Ensure all workbenches always have an associated `ReferentialSuite` by
validating presence of the `output` attribute.
In order to pass the 'should have a valid factory' test, we need to
define a `ReferentialSuite` factory and set up a default association on
`output` in the `Workbench` factory.
We also need to add set `output` when creating a `Workbench` in
`spec/support/referential.rb`, otherwise we get a validation error that
breaks the tests. Clean up the formatting of that call. In order to pass
a `ReferentialSuite`, I just create one above, but I'm not sure if I
should be using a `find_or_create` mechanism like the other associated
objects do above.
Refs #3520
|
|
like in application controller
|
|
|
|
|
|
Refs #1784
|
|
lines in Referential. Refs #826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|