| Age | Commit message (Collapse) | Author |
|
|
|
models changes
|
|
|
|
|
|
Refs #4585
|
|
Refs #4579
|
|
af83/3520-workbench--add-output-association-to-ReferentialSuite
3520 workbench add output association to referential suite
|
|
Instead of creating the objects directly in ActiveRecord, use our
existing factories for these records as suggested by Robert.
Refs #3520
|
|
Leverage our existing factories instead of creating the objects on the
models directly.
Refs #3520
|
|
|
|
Added Controller Spec
Fixed Older Specs
|
|
ImportPolicy changing *.imports →' imports.*
|
|
|
|
compliance_check_set spec
|
|
|
|
|
|
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
|
|
Since all `Workbench`es must have an associated `ReferentialSuite` via
`output`, if none is provided when creating a new `Workbench`, create
one automatically.
This is done in a `before_validation` callback (eck, AR callbacks).
In order for our prior 'should validate_presence_of' test to continue to
work, we have to work around the new callback, otherwise Shoulda can't
set `output` to `nil` to run its expectation and the test fails.
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
|
|
The `output` attribute should be a `ReferentialSuite`.
Refs #3520
|
|
Recommendation from Robert. The `@__all__` is an implementation detail.
It's more fragile to use `#instance_variable_set` in each test. Instead,
put that part in a `before` block so that if we decide to change it, we
only have to do so in one place.
Now each test can blithely assume that `ModelAttribute.all` starts out
as an empty list.
Refs #4401
|
|
`ReferentialSuite` has many `Referential`s. Need to add a foreign key
column to the `referentials` table to allow that to work.
Refs #3519
|
|
This model is responsible for collecting referentials in order to merge
them into a single referential.
* `new` corresponds to a referential in the process of being validated
* `current` corresponds to the most recently validated referential
Refs #3519
|
|
|
|
af83/4401-create-compliance-control-model-attribute-class
4401 create compliance control model attribute class
|
|
Enables finding a `ModelAttribute` by a string code combining klass and
name.
Refs #4401
|
|
This returns all defined `ModelAttribute`s as a hash of class keys
containing lists of the attributes they contain.
Refs #4401
|
|
This allows people to get a list of the classes defined in
`ModelAttribute`. The classes are turned into constant-cased strings.
Not sure if that's useful, but this is how it was described in the
ticket.
Refs #4401
|
|
This enables filtering by class like `.methods_by_class` and
additionally only selecting attributes matching a certain data type.
Refs #4401
|
|
In c9a997f337c9b45f62b50629de96fa95f20c1a7f, we changed the storage
mechanism of `all` and made it not a class method. Update the spec
description to reflect this.
Refs #4401
|
|
|
|
|
|
|
|
|
|
We also needed to take remove the right time table dates when we update day types :
- excluded dates that are out of day types
- included dates that are in day types and in periods
|
|
Didn't like how `#initialize` takes a different type for `klass` than
`.methods_by_class`. Make these types and values uniform. If we need to
change it, we should make a separate mechanism to do so. I think.
Refs #4401
|
|
Allows us to get all `ModelAttribute`s given a certain class name.
Needed an `#==` method to be able to test object equality more easily so
I added one in.
I don't like that the `klass` is a lowercase symbol and the `klass`
attribute to `.methods_by_class` is a constantized string. Want to
correct that and make them uniform. Only did it this way because that's
how it was suggested in the ticket.
Refs #4401
|
|
A method that returns a string representation of the attribute, in the
form `:class#:name".
This will be used to store a reference to the attribute in the database.
For example, a validation will reference a `ModelAttribute` in a
database column using this `#code` string.
Refs #4401
|
|
When `ModelAttribute` instances are added to `@@all` directly in the
class, the test breaks. Make it a little more robust by checking change
in array size instead of total size.
Refs #4401
|
|
This new class will allow us to generate a list of all editable fields
in all our models including the type of each field.
We need this for Compliance Control, in order to get a list of fields or
models & fields that can be selected to validate a given model
validation check. The crucial bits here are the models, fields, and the
types of those fields. These need to be defined (manually at least to
begin with), accessible, and filterable.
Refs #4401
|
|
|
|
|
|
Refs #4543
|
|
Fixes: #4431@0.16666666666666666h;
|
|
4446 spec features api keys
|
|
|
|
|
|
|
|
|
|
* Make failing /delete_api_key_feature_spec pending
- Seems Capybara only sees html from the partial api_keys/_form, but not
the parent api_keys/edit, which happens to contain the delete link :(
* ApiKeyPolicy adapted
- update? depends on record's organisation as no referential present
- create? depends on user's permission only as organisation will be correct anyway
|