Javi Martín
fd1325768f
Check exact array contents instead of inclusion
...
We're using `eq` and `match_array` in most places, but there were a few
places where we were still checking each element is included in the
array. This is a bit dangerous, because the array could have duplicate
elements, and we wouldn't detect them with `include`.
2019-09-29 23:57:35 +02:00
Javi Martín
9f0088396e
Only create records on tests using them
...
The test or the draft phase legislation filter was using an entirely
different set of records, but was still creating the records used in the
open and past filter as well.
This made it hard to test the filter, since it returned records from
both sets.
Grouping the past and open filters together guarantees their records
won't be created in the phase draft test, and so we can test the exact
contents of the array.
2019-09-29 23:57:35 +02:00
Javi Martín
7b0771106e
Remove isolated useless assignments
...
These variables are not surrounded by other assignments, and so they can
safely be removed without making it harder to read the code vertically.
2019-09-25 12:43:44 +02:00
Javi Martín
66334b5757
Add globalizable tests for all translatable models
...
So now we test in depth at the model level, and can be a bit more
relaxed about integration tests for translations.
Note we're defining some extra factories to make sure all translatable
attributes with presence validation rules are mandatory. This way we can
simplify the way we obtain required fields, using `required_attribute?`.
Otherwise, fields having an `unless` condition in their presence
validation rules would count as mandatory even when they're not.
2019-09-23 18:01:44 +02:00
Javi Martín
f9ed186909
Add rubocop spacing rules
...
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
Senén Rodero Rodríguez
049c56e9f8
Enable soft_deletion of Legislation::Process::Translations
2019-06-27 09:19:35 +02:00
lalo
be8a0dbe8a
Add Milestone tag select filter on executions public page
2019-06-07 14:17:32 +02:00
lalo
3282606be2
Add act_as_taggable_on milestoneable concern
2019-06-07 14:07:43 +02:00
decabeza
4a532bf807
Use activerecord translations on admin legislation processes
2019-03-05 17:43:39 +01:00
Julian Herrero
31ac8b7f55
Change single quotes to double quotes
2019-02-15 11:40:39 +01:00
decabeza
060a4c684f
Remove legislation processes next filter
2019-02-08 14:29:43 +01:00
decabeza
cdb66ce23c
Refactor header process colors specs
2019-01-30 13:17:35 +01:00
decabeza
2695e19e2f
Fix hound warnings
2019-01-29 17:54:02 +01:00
Manu
14d64e94d0
rspec tests were added for the process banner
2019-01-21 12:02:27 -05:00
decabeza
534ef9c492
Hides process on index if draft dates match with date current
2018-12-12 18:23:17 +01:00
decabeza
df221b43a0
Fixes hound warnings on legislation processes
2018-12-12 18:23:11 +01:00
João Lutz
34b58a5208
Adds draft phase functionality in legislation processes
2018-11-19 22:18:50 -02:00
Bertocq
34bb9d65b1
Enable RSpec/NotToNot cop and fix all issues
...
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
2018-01-07 17:39:48 +01:00
Bertocq
1441de5107
Enable RSpec/HookArgument cop and fix issues
...
To be consistent about before/after arguments, as `:each` or `:example`
are same and default scopes, best not to send an argument in those
scenarios.
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
2018-01-07 02:07:19 +01:00
Bertocq
ed16a78f42
Enables RSpec/ExampleWording and fixes all issues
...
Both avoiding 'should' and repiting 'it' on the tests description
improves reading them and also makes all descriptions consistent.
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
2018-01-07 01:03:45 +01:00
rgarcia
2b52d26d82
refactors notifications into concerns and shared examples
2017-12-14 16:15:30 +01:00
Bertocq
6529e37ae8
Fix all rubocop Rails/PluralizationGrammar issues and remove the file list form rubocop_todo file
2017-06-25 15:46:46 +02:00
Bertocq
990437dc40
Remove no longer used active/show/open _phase helper methods from Legislation Process, and specs
2017-06-13 22:04:36 +02:00
Bertocq
e55328caf4
Rename legislation process final_version_publication phase name to more descriptive result_publication
2017-06-13 22:04:36 +02:00
Bertocq
0c27f1ffde
Rename Legislation Process final_publication_date field to more descriptive result_publication_date
2017-06-13 22:04:36 +02:00
Amaia Castro
28de717300
Show only active phases
2017-02-09 17:32:38 +01:00
Fernando Blat
814cf9df56
Show creation date and status in admin list
2017-01-05 10:22:40 +01:00
Amaia Castro
bc1905e5d9
Validate date ranges for legislation process
...
Only validates start and end dates for the whole process or a phase, not overlap between phases, as they are permitted, at least for now.
2017-01-04 18:13:28 +01:00
Amaia Castro
36399277ec
Legislation Process page
2016-12-22 11:23:49 +01:00
Amaia Castro
369804a2ba
Base Legislation::Process model and admin page
2016-12-05 13:24:23 +01:00