aboutsummaryrefslogtreecommitdiffstats
path: root/spec
AgeCommit message (Collapse)Author
2017-11-16Refs: #4461@1h; CodeReviewrobert-bupRobert
- using webmock instead of mocking Net::HTTP therefore removing the connascence between the spec and the HTTP lib used in the implementation, thank you Teddy
2017-11-15Fixes: #4461@2h; Specing and ImplementingRobert
2017-11-15Refs: #4461@1.5h; Repaired netex_import factory, adapted spec/models/import_specRobert
2017-11-13ComplianceCheckSet#update_status: Return `true` if no update happenedTeddy Wing
Return `true` from this method by default. If the `#update` call fails, then it will return `false`, but in all other cases, we should return `true`. That way, when the `Api::V1::ComplianceCheckSetsController#validated` endpoint is called, it will respond with the `ComplianceCheckSet` object instead of: {"status":"error","messages":[]} with no error messages. Refs #4757
2017-11-13ComplianceCheckSet#update_status: Handle resources with "IGNORED" statusTeddy Wing
If any associated resources have the "IGNORED" status, this shouldn't affect the outcome of a "successful" status. Allow the `ComplianceCheckSet` to be "successful" even if some `Resource`s are "IGNORED". Refs #4757
2017-11-13ComplianceCheckSet#update_status: Return result of `#update`Teddy Wing
We should return the result of the `ActiveRecord` `#update` call, so that we can determine if there was an error saving the `ComplianceCheckSet` record. Refs #4757
2017-11-13Revert "ComplianceCheckSet#update_status: Should return a boolean"Teddy Wing
This reverts commit b7477e28f90c961079c7b12c4992071cbc11b2d6. This logic isn't right. We should return true/false based on the result of `update`, as in, whether the value was able to be updated, instead of on the contents of the status.
2017-11-13ComplianceCheckSet#update_status: Should return a booleanTeddy Wing
Ensure that `#update_status` always returns a boolean value. We'll be using this to determine whether the updated status was 'successful' or not. Hmmm. Wait. That's not right. We want to return true from the update, we don't care about the status. The error case should be when the `update` fails. Darn. Refs #4757
2017-11-13ComplianceCheckSet#update_status: Reverse test data orderTeddy Wing
Move the successful `ComplianceCheckResource`s to the end so that these tests fail if we don't wait until the end of a loop through the resoures before updating the status to 'successful'. Refs #4757
2017-11-13ComplianceCheckSet#update_status spec: Add failure status casesTeddy Wing
Add test cases for status update when `ComplianceCheckResource` are "ERROR" and "WARNING". If a single Resource is "ERROR" or "WARNING", then the `ComplianceCheckSet` becomes "failed" or "warning". Refs #4757
2017-11-13ComplianceCheckSet#update_status: Add spec for successful childrenTeddy Wing
Initial spec that checks the correct status field change when all `ComplianceCheckResource`s are successful. Refs #4757
2017-11-13ComplianceCheckSets#validated: Add response bodyTeddy Wing
On successful status update, respond with the `ComplianceCheckSet` object attributes. Otherwise, respond with an error JSON. Refs #4757
2017-11-13ComplianceCheckSetsController: Get ComplianceCheckSet and update statusTeddy Wing
Get the `ComplianceCheckSet` from the URL and call its `#update_status` method. This doesn't currently work all the way. We need to send a real response. Refs #4757
2017-11-13Add route stub for validation finalisationTeddy Wing
This route will be called by the Java application when ComplianceCheck validation is completed. It will perform post-validation work, primarily updating statuses. Refs #4757
2017-11-13Change permission list for specscedricnjanga
2017-11-13Refs #4952 Fix bug related to compliance control set action links displaycedricnjanga
2017-11-09Merge branch '4944_remove_route_section_code'Xinhui
2017-11-09Refs #4932 Change route duplication to redrect to routes#indexcedricnjanga
2017-11-09Refs #4776 Add policies to ComplianceControl and ComplianceControlSetcedricnjanga
2017-11-09Remove model route_sectionsXinhui
2017-11-08Merge pull request #110 from af83/4755-page_for_validate_referentialteddywing
4755 page for validate referential
2017-11-08fix bad indentationGuillaume
2017-11-08filter compliance_control_set by organisation on valisate referential and ↵Guillaume
add specs
2017-11-06fix specsGuillaume
2017-11-06Merge pull request #109 from af83/4802-referential-model-normalisationteddywing
4802 referential model normalisation
2017-11-06Refs #4849 change compliance control clone speccedricnjanga
2017-11-03 Fixes: #4802@1h;Robert
CR 3rd (and hopefully last) part - more typo corrections - reactivating deactivated specs - fixed reactivated specs
2017-11-03Merge pull request #106 from ↵Robert Dober
af83/4782-create-worker-for-compliance-check-copy--rb201710301748 4782 create worker for compliance check copy rb201710301748
2017-11-03Refs: #4802@0.15h;Robert
CR 2nd part - typos - unnecessary `class: Referential` removed from referentials_factory - regrouping of referential_suite related model specs
2017-11-03 Refs:#4802@0.5h;Robert
CodeReview: - Exchange fr and en translation files for referential_suites - Consistent usage of `jeu de donées` and `espace de travail` dans les *fr.yml Fixes: #4802@0.2h; Replaying former work. To identify spec regression Step 3: Added validation of reference_suite#new/current Made all specs pass
2017-11-02ComplianceControlSetCopier spec: Test that `#copy` returns CCkSetTeddy Wing
The `ComplianceControlSetCopyWorker` depends on `ComplianceControlSetCopier#copy` to return the `ComplianceCheckSet` that it creates. Refs #4782
2017-11-02 Refs: #4802@2h; Replaying former work. To identify spec regressionRobert
Step 2: Added validation of reference->workbench->organisation consistency Made all specs pass Chased bug #4826
2017-10-31Fixes: #4774@1h;Robert
Filter Feature Spex of ComplianceControlSet#show implemented
2017-10-31Refs: #4774@2h; Debugging feature specs, added ↵Robert
ComplianceControl.subclass_patterns [amend me] [skip-ci]
2017-10-31Refs: #4774@3h;Robert
Speced feature compliance_control_set/show and filtering on Severity MISSING: Object Filter needs 2B specified
2017-10-31Refs: #4774;Robert
DB Setup for specs
2017-10-31Merge pull request #107 from af83/4817-better-traductionRobert Dober
4817 better traduction
2017-10-31Refs: #4817@0.3h; Hotfix for wrong message for spurious directories in zip file4817-better-traductionRobert
2017-10-31Refs: #4817@0.1h; CodeReview related fix filename instead of import nameRobert
2017-10-31Fixes: #4817@0.35; Translations changed, Specs adpated to new translation ↵Robert
param name
2017-10-31Fix spec to add name for import factory Refs #4816Luc Donnet
2017-10-31Fix locales problem for wrong file extension in import Refs #4816Luc Donnet
2017-10-30ComplianceControlSetCopyWorker spec: Always stub API callTeddy Wing
In the first test, we weren't stubbing the Java API call, so it would get executed for real. Put the HTTP stub in a `before(:each)` call so that it gets stubbed for every test here. Additionally, reorganise the tests a bit to clean them up. Move the HTTP stub to a `let` to allow it to be called in a couple different places. Since the HTTP stub depends on the `check_set` double, move that to a `let` too. And have the `ComplianceControlSetCopier` mock always return `check_set`, now that the app code depends on that return value. Refs #4782
2017-10-30ComplianceControlSetCopyWorker: Pass ComplianceCheckSet ID to JavaTeddy Wing
Previously I had been passing the `ComplianceControlSet` ID to the Java API. The API actually expects the ID of the `ComplianceCheckSet`. In order to get this ID, have the `ComplianceControlSetCopier` return the `ComplianceCheckSet` that it creates, and use that to pass the the ID to the Java API. Refs #4782
2017-10-30ComplianceControlSetCopyWorker: Call Java validation APITeddy Wing
Call the Java API URL to launch a validation after having copied the `ComplianceControlSet` into a `ComplianceCheckSet`. Copied the format with error logging from `NetexImport#launch_java_import`. In the test, make the ID variables global by putting them in `let`s. Add `config.iev_url` to the Rails `test` environment so that we can access this from our tests. TODO: I just realised I'm sending the wrong ID. I should be sending the check set ID. Refs #4782
2017-10-30Add ComplianceControlSetCopyWorkerTeddy Wing
A new worker that launches the work to copy a `ComplianceControlSet` to a `ComplianceCheckSet`. Currently only handles a single control set and referential pair. Probably want to extend this to handle multiple lists of these objects. Also need to add in a call to the Java API to validate the check. Refs #4782
2017-10-24Merge pull request #100 from af83/4633-import-handle-incorrect-zipRobert Dober
Fixes: #4633;@0.5h; CR changes
2017-10-24Fix typo in import factorycedricnjanga
2017-10-24Fix error on build due to missing translationcedricnjanga
2017-10-24Fixes: #4633;@0.5h; CR changes4633-import-handle-incorrect-zipRobert