aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support
AgeCommit message (Collapse)Author
2017-12-19Merge branch '5287-clean-links-in-stop-areas-index'Zog
2017-12-18Refs #5287; CR 1Zog
- Get rid of ActiveSupport::Concern in the spec helpers - Rename misnamed spec files
2017-12-15- Fix specs on connections_links/indexZog
- Fix specs on connections_links/show - Update pundit view specs helper to use the current referential when it has already been defined
2017-12-15Refs #5287;Zog
Add specs for the view. Refactor to come
2017-12-15Fixes: #5281@1.2h; View specs and minor CR change from #50065281-workbench-import-structural-bug-reading-zipRobert
- CR change from #5006, severity of zip file messages :warning -> :error - View specs for showing import_messages
2017-12-14Refs: #5006@3h;Robert
Zip Support for Specs, allowing to create zip archives in memory * create zip archive from hash or directory tree * Metaspecs -- commented out - for potential refactoring of Zip Support - as readable documentation on how to use Zip Support
2017-12-13spec/support/referential: Restore old exclusions for truncationTeddy Wing
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
2017-12-13referential_lock_during_creation_spec: Make truncation strategy stickTeddy Wing
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
2017-12-13spec/support/referential: Eliminate data errors in truncation testsTeddy Wing
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
2017-12-06Merge remote-tracking branch 'origin/master' into ↵Teddy Wing
5024-prevent-duplicate-referentials-from-being-created-during-parallel-db-transactions--rb201711271659
2017-12-05Add some changes according to PR reviewcedricnjanga
2017-12-05Merge remote-tracking branch 'origin/master' into ↵Teddy Wing
5024-prevent-duplicate-referentials-from-being-created-during-parallel-db-transactions--rb201711271659 Conflicts: app/models/referential.rb A whitespace conflict in a place I don't even remember editing? Okaay.
2017-12-05Refs: #5179@1.25h; Referential Creation Enforces objectid_format from ↵Robert
associated Workbench - changed ObjectIdFormatterSupport as requested - respeced all defined cases - implemented respec Missing: What to do in `define_default_attributes` if ref has no workbench and no `objectid_format`?
2017-11-29spec/support/referential: Rename `:js` filter to `:truncation`Teddy Wing
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
2017-11-22Merge branch 'master' into 4941-refactoring_object_idcedricnjanga
2017-11-22Merge branch 'master' into 4941-refactoring_object_idcedricnjanga
2017-11-21Change the way we name classescedricnjanga
We now always use modules for namespaces => same structure for models, decorators, policies...
2017-11-17Merge pull request #113 from af83/4823-compliance_check_showteddywing
4823 compliance check show
2017-11-17Refs: #4283@16h;Robert
- Implements the view Missing: - Spex failing (xpath navigation inside the display blocks is still faulty) - Links to compliance_checks#show do not work (actually not this page's problem)
2017-11-17Refs: #4461@0.75h; Fixing netex_import after_create callback to ↵Robert
after_commit on: :create
2017-11-17Refs: #4461@1h; CodeReviewRobert
- 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-13Change permission list for specscedricnjanga
2017-11-09Refs #4776 Add policies to ComplianceControl and ComplianceControlSetcedricnjanga
2017-10-24Refs: #4633@0.5h; WorkbenchImportWorker implements message creation for ↵Robert
spurious directories - Speced and implemented Missing: - Exact message parameters (change key from xxx, how to add names of spurious directories)
2017-10-24Refs: #4633@3h:Robert
- Discussing Spec - Speced and implemented the corrupt zipfile part Next: - Spec incorrect directory structure part - Implement incorrect directory structure part
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-02Refs: #4267@0.45h;Robert
- setting up a CCCLD subdir struct for CCCLD related tests - removed all occcurances of `@@default_criticity`
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-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-09-28Refs #4635 Add permissions translations regarding the news models ↵cedricnjanga
(Compliance Control)
2017-09-27Merge pull request #78 from ↵Robert Dober
af83/3520-workbench--add-output-association-to-ReferentialSuite 3520 workbench add output association to referential suite
2017-09-27spec/support/referential.rb: Use factoriesTeddy Wing
Instead of creating the objects directly in ActiveRecord, use our existing factories for these records as suggested by Robert. Refs #3520
2017-09-26Fixes: #4440@0.5h;Robert
Added Controller Spec Fixed Older Specs
2017-09-26Refs: #4440@0.5h Added import permissionRobert
2017-09-25spec/support/referential.rb: Remove `output` initialisationTeddy Wing
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
2017-09-25Workbench: Validate presence of `output`Teddy Wing
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
2017-09-19Fix compliance_control controller spec due to missing permissionsXinhui
2017-09-14Fixes: #4431@0.16666666666666666h;4431-permission-renamingRobert
2017-09-14fix permission tests for newly introduced `api_keys.*` permissionsRobert
2017-09-12Merge pull request #63 from af83/4189-duplicate-routeLuc Donnet
4189 duplicate route
2017-09-12Change some specs to have all the wokbenches name to be 'Gestion de l'offre' ↵cedricnjanga
like in application controller
2017-09-11merged with masterRobert
2017-09-05Referential#new_from :cedricnjanga
Added params to certains paths to have the workbench_id in it. The goal is to have the current workbench_id to assign it when do a Referential#new_from Then I finished the use of the functional scope to avoid potential errors I skipped some tests that hve a #TODO so we can easily find them
2017-08-23API - WorkbenchImport #create actionXinhui
Refs #4280
2017-08-22API - workbench imports controllerXinhui
2017-08-22API - Refactoring iboo controller basic auth username should be an ↵Xinhui
organisation code
2017-08-22API - Rspec basic auth api controllerXinhui
2017-08-21Refs: #4189@4h; Allowing change of `name` and `public_name` in ↵Robert
`Chouette::Route#duplicate`
2017-08-17Model ApiKey add belongs_to organisationXinhui