aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
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-09Merge branch '4944_remove_route_section_code'Xinhui
2017-11-09Refs #4932 Change route duplication to redrect to routes#indexcedricnjanga
2017-11-09Remove model route_sectionsXinhui
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-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-31Refs: #4774@2h; Debugging feature specs, added ↵Robert
ComplianceControl.subclass_patterns [amend me] [skip-ci]
2017-10-31Refs: #4774;Robert
DB Setup for specs
2017-10-31Fix locales problem for wrong file extension in import Refs #4816Luc Donnet
2017-10-24Fix error on build due to missing translationcedricnjanga
2017-10-17Merge branch 'master' of github.com:af83/stif-boivRobert
2017-10-17Change routing constaint zone control default codescedricnjanga
2017-10-16Change default code to toute control / stop point in JPcedricnjanga
2017-10-16Hotfix correctionRobert
2017-10-16Hotfix deactivated pending testsRobert
2017-10-16Fixes: #4270@0.1h; removed pattern validationRobert
2017-10-16Refs: #4720@1.3h;Robert
Validation implemented for min_max_values with correct I18n'd error messages Applied to: VehicleJourneyControl::Speed & GenericAttributeControl::MinMax
2017-10-16Refs: #4270@0.6h;Robert
GenericControlAttribute validation speced for - MinMax - Pattern
2017-10-14Fix translations for compliance_control type translation, compliance_control ↵Luc Donnet
validation, compliance_control module
2017-10-12Fixes: #4709@0.15h;Robert
Nullified ComplianceCheck STI column speced and implemented via `self.inheritance_column = nil`
2017-10-12Refs: #4709@0.75h;Robert
DONE: - Copied all node atts for ComplianceChecks - Migration of CompliancCheck#criticity int -> string TODO: - Check what to do with attribute ComplianceCheck#type
2017-10-09Refs: #4629@1h; Implementing CR + missing worker specRobert
2017-10-09Fixes: #4629@4.5h; Implemented copyRobert
2017-10-09Refs: #4629@1.5h;Robert
Specs and implements coherent direct and indirect ComplianceControlSet parentship for ComplianceControls
2017-10-09Refs: #4629@0.33h; Fixes shoulda helper specs for ComplianceControl, safe ↵Robert
for name
2017-10-04Refs 4517 Add some modification to the two modules to add methods to list ↵cedricnjanga
the sorted transport modes and submodes
2017-10-04Rename spec test for compliance_control Refs #4690Luc Donnet
2017-10-02Merge pull request #82 from af83/4627-compliance-fix-class-varsLuc Donnet
4627 compliance fix class vars
2017-10-02Refs: #4267@1.5h; ComplianceControlClassLevelDefaultsRobert
All implemented as class methods
2017-10-02Refs: #4267@1.5h; ComplianceControlClassLevelDefaultsRobert
- All Specs and Factories implemented - Fixing More Typos in dir/file names and incorrect module names; long live copy and paste
2017-10-02Refs: #4267@1.5h; ComplianceControlClassLevelDefaultsRobert
- Working on factories - Scaffolding out specs - Fixing typos in dir struct and class names for routing_constraint_zone_control
2017-10-02Refs: #4267@0.45h;Robert
- setting up a CCCLD subdir struct for CCCLD related tests - removed all occcurances of `@@default_criticity`
2017-10-02Fix transport mode and submode modulescedricnjanga
2017-10-02Refs: #4627@1h;Robert
- Rebase on udated master - Removal of `default_criticity` from ComplianceControl Class Level Defaults - Refactoring of specs to allow usage of the same shared examples (given that more models need to undergo the same refact)
2017-10-02Fixes: #4627@0.55h;Robert
Class Methods replace Class Attributes
2017-10-02Refs: #4627@2h;Robert
Comprehensive Tests for ComplianceControl Class Level Default Attributes
2017-10-02Refs: #4627@0.75h;Robert
Got some data_modifier support for attribute generation w/w-o defaults for model tests generic_attribute_control
2017-10-02Refs: #4627@0.15h;Robert
Put old behavior under tests, thusly also showing the motivation of this ticket.
2017-10-02Refs #4638 Add reliation between ComplianceCheckSet and CompliancecheckMessagecedricnjanga