voodoorai2000
ccd342bb51
Fix flaky spec for translations
...
This spec was causing a side effect on another spec[2], making it fail 😌
I think it was because no translation had been called yet, in the failing spec, and so the the i18n backend translations had not been initialized, and was always returning empty translations for any locale. This might have been due to tampering with translations in the this newly introduced spec.
By forcing translations to load after this new spec, the other spec passes again
[2] https://github.com/AyuntamientoMadrid/consul/blob/master/spec/features/localization_spec.rb#L20
2018-10-10 12:47:40 +02:00
voodoorai2000
0a0261900c
Display language name or language key
...
There where two issues with the current implementation:
- There was a possible duplication between looking up the language name in key "locale" and in key "i18n.language.name"
- The "default" option was not being picked up, as the fallback always returned the default locale's translation, "English"
With this implementation there is only a single place to put the language name: i18n.language.name. I think this place is easier to find and understand for Crowdin translators than a "locale" key hidden in general.yml
If the translation is not found we display the language key, instead of English, which makes more sense to me too 😌
Solution based on recent comments[1] on a related I18n issue
[1] https://github.com/svenfuchs/i18n/issues/365#issuecomment-419263847
2018-10-05 18:08:41 +02:00
Bertocq
830bb37189
Enable RSpec/VerifiedDoubles cop, fix issues & stash one
...
Can't figureout solution for offense at spec/models/verification/management/email_spec.rb
so its stashed at .rubocop_todo.yml
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubles
2018-01-07 18:47: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
Bertocq
dc116cc3fe
Fix line lenght above 140
2017-11-13 02:31:55 +01:00
Bertocq
f20db4e3e4
Fix user helper expectation
2017-10-19 13:32:48 +02:00
Bertocq
71b57ffc67
Always use parentheses on method definition
2017-09-25 22:50:24 +02:00
Bertocq
ca35c8b85c
Fix Style/NestedParenthesizedCalls rubocop issues
2017-09-25 22:47:59 +02:00
decabeza
b9eb6867d7
updates tags on specs
2017-08-03 10:14:45 +02:00
Bertocq
f6fe9cc7d2
Fix all Layout/SpaceAroundOperators rubocop issues and remove file list from rubocop_todo list
2017-06-26 18:04:20 +02:00
decabeza
5e0d5fc8c3
Merge branch 'legislation-module-stable' of https://github.com/medialab-prado/consul into medialab-legislation
2017-05-22 18:43:49 +02:00
Juanjo Bazán
113f9b32d7
Merge branch 'master' into polls
2017-01-19 16:51:19 +01:00
Amaia Castro
a2a61341fe
Merge branch 'master' into legislation-module-stable
2017-01-11 22:54:41 +01:00
Juanjo Bazán
7a448b6890
adds BudgetInvestment case to users_helpers
2017-01-10 20:58:01 +01:00
Fernando Blat
fba4c79d2a
Show the first paragraph of the description
2017-01-05 09:43:40 +01:00
Juanjo Bazán
08ea4b35eb
Merge branch 'master' into polls
2017-01-02 12:14:40 +01:00
kikito
68d598a43d
Merge branch 'master' into budgets
2017-01-02 12:10:23 +01:00
rgarcia
13d9f6c294
removes obsolete spec
2016-12-30 11:55:44 +01:00
rgarcia
365faeff31
removes physical votes from proposals
2016-12-29 12:05:29 +01:00
kikito
03ef20bfde
Merges orders_helper functionality inside has_orders concern
...
Both these objects where using/setting a variable called valid_orders.
As a results, some specs where becoming flacky
(features/budgets/investments_spec.rb, balloting phase). By putting
them together, there is no `valid_orders` variable any more (everything
is @valid_orders) and the flackyness is gone.
2016-12-24 14:42:46 +01:00
rgarcia
fda2f3c89e
adds admin submit button helper
2016-11-14 13:56:49 +01:00
Juanjo Bazán
64a614c67f
adds geozone helper to map ids and names
2016-08-03 20:20:52 +02:00
Juanjo Bazán
06596ac4d8
adds author_of? helper method
2016-06-15 17:01:50 +02:00
rgarcia
e2689d640c
refactors notification helpers
2016-06-15 12:12:56 +02:00
Juanjo Bazán
5aa9cf9c50
changes links in 'My activity' to point to comment
...
(instead of to commentable)
Closes #947
2016-03-14 13:17:29 +01:00
Juanjo Bazán
0325dd6199
refactors settings/flags helper to memoize values
2016-02-04 17:45:43 +01:00
Juanjo Bazán
e4dc496b89
adds geozone_select_options helper method
2016-01-13 13:07:03 +01:00
Juanjo Bazán
aee9a9d7c0
adds geozone helper
2016-01-11 14:01:50 +01:00
Juanjo Bazán
704a038795
groups notifications
2016-01-08 14:32:16 +01:00
rgarcia
e2f419e625
destroy notifications when marked as read
2016-01-07 12:02:01 +01:00
rgarcia
b5e9113718
merges activities into notifications
2016-01-06 12:33:37 +01:00
Julian Herrero
d9ba3edc2a
mostrar notificaciones a los usuarios cuando alguien comenta en su
...
debate o responde a su comentario
2016-01-05 17:43:44 +01:00
Juanjo Bazán
cf271fe33a
uses proposal total_votes for % helper methods
2015-12-18 13:15:00 +01:00
rgarcia
dffc5f5eae
adds specs
2015-11-23 13:43:48 +01:00
rgarcia
08c499d4f6
removes spec focus
2015-11-09 13:49:21 +01:00
rgarcia
f4cee3b1c1
adds helper specs
2015-11-09 13:46:37 +01:00
rgarcia
7259ac06e8
renames user_helper
2015-11-09 13:28:02 +01:00
Alberto Garcia Cabeza
abad54d01a
Updates tests with new texts
2015-10-28 12:47:51 +01:00
Sergio Arbeo
52de028be6
Add helper tests
2015-10-28 00:39:57 +01:00
kikito
1fa364655f
moves humanize_document_type from AdminHelper to UserHelper
2015-10-08 17:22:39 +02:00
rgarcia
0801cab461
adds spec for humanize document type helper [ #500 ]
2015-09-28 15:14:50 +02:00
Juanjo Bazán
26da253a5d
moves helper method to votes helper and adds spec
2015-09-15 14:44:12 +02:00
rgarcia
b5de9830ec
fixes specs
2015-09-14 21:25:05 +02:00
rgarcia
eea3b0922e
adds already supported proposals
2015-09-14 21:21:34 +02:00
Juanjo Bazán
a472b4acc8
implements percentage in proposal supports
2015-09-14 19:06:07 +02:00
Juanjo Bazán
9dee1bc8b2
adds helper to show the right progress bar
2015-09-13 19:00:11 +02:00
rgarcia
932612a207
adds specs for masked emails and phones
2015-08-30 15:15:13 +02:00
rgarcia
4839081ad2
uses simple_captcha instead of recaptcha [ #51 ]
2015-08-10 20:24:56 +02:00
rgarcia
416693fb01
fixes specs [ #45 ]
2015-07-28 18:32:51 +02:00
rgarcia
f4f0593fda
displays captcha only on new, not edit
2015-07-28 12:39:39 +02:00