Commit Graph

2691 Commits

Author SHA1 Message Date
Bertocq
0698043340 Fix indentations 2018-01-07 01:06:07 +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
2253155a51 Enables RSpec/EmptyLineAfterSubject & fixes all issues
Read more about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject
2018-01-07 00:50:50 +01:00
Bertocq
fa017b664f Enables RSpec/EmptyLineAfterFinalLet cop & fixes all issues
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet
2018-01-07 00:49:37 +01:00
Bertocq
265d4d0967 Enables RSpec/DescribedClass cop & fixes all issues
Autocorrection for existing issues, and stashing at .rubocop_todo.yml
the false positives

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
2018-01-07 00:38:19 +01:00
Bertocq
6ec6f64675 Enable RSpec/DescribeClass rubocop rspec cop & fix issues
Manually fixes all issues & "stashed" false positives at .rubocop_todo.yml

Read about the cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
2018-01-07 00:20:55 +01:00
Bertocq
7f14544f71 Enable Capybara/CurrentPathExpectation cop & fix issues
Read cop description http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation to better understand reasons behind enforcing this rule

On some cases the `only_path: true` was needed as argument of `have_current_path` matcher to avoid comparing the url parameters and just checking the path.
2018-01-06 23:31:41 +01:00
Bertocq
de2816a6a5 Enable RSpec/BeforeAfterAll rule and fix all issues
This cop tries to avoid state leaking between examples. The fixes done on the code don't follow the suggested path, since the usage of `before(:all)` was not really useful. By using RSpec's `let` method we achieve same goals but with much better and readable tests.

Check Cop description at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
2018-01-06 21:16:00 +01:00
Bertocq
2105e985a8 Fix budget investment random order feature to generate just enough elements for pagination 2018-01-06 18:21:24 +01:00
Angel Perez
6107f51b19 Add specs for valid sitemap generation (#2219) 2018-01-05 15:16:41 -04:00
Bertocq
d3719f0b42 Merge branch 'fix/documentable_multiple_docs' 2018-01-03 18:03:20 +01:00
Bertocq
e8570ed7bb Fix spec link upcase to downcase for archived proposals 2018-01-03 18:03:05 +01:00
Bertocq
3bf8948b11 Fix typo, dowload to download 2018-01-03 17:38:44 +01:00
Bertocq
1246bd4e62 Fix poltergeist input focus issues 2018-01-03 17:38:44 +01:00
Bertocq
e71340bccb Bring back max doc attachment scenario, using all pdf fixtures 2018-01-03 17:38:44 +01:00
Bertocq
5bf16eb1ac Remove index param from attach new file helper test function 2018-01-03 17:38:44 +01:00
Bertocq
fb1f45ba6b Add two more pdf fixture files for testing 2018-01-03 17:38:44 +01:00
BertoCQ
4885acb7ac Merge pull request #2225 from consul/chore/refactor_documents_document_partials
Refactor documents and document view partials
2018-01-03 17:38:16 +01:00
Bertocq
bf9ea64088 Fix spec link upcase to downcase for archived proposals 2018-01-03 17:37:55 +01:00
Bertocq
2f7e81e5ca Remove unused documentable_factory_name argument from documentable_attach_new_file helper method 2018-01-02 13:59:58 +01:00
Bertocq
d7d1a85fbb Refactor documents and document view partials 2018-01-02 13:32:42 +01:00
iagirre
64aaa97d86 Add feature specs to check that edit links and "Selected" buttons are not displayed/enabled.
"Selected" button appears as text instead of dissapearing completely.
2017-12-27 16:23:21 +01:00
rgarcia
96066aee44 Validates map presence only on create
As we are using an attr_accessor to make sure a user accepts that the
proposal “has no map”, the validation was being run in every save.

Making other things break, for example the updating of the counter
cache `cached_votes_up`, when someone voted for the proposal, as the
attr_accessor `skip_map` was not present
2017-12-26 12:39:29 +01:00
Bertocq
f6d23df862 Avoid using eval when send can do the job 2017-12-25 23:47:55 +01:00
Bertocq
2283237d44 Avoid Looking up factories by class is deprecated and will be removed in FactoryGirl 5.0 2017-12-25 23:46:51 +01:00
Bertocq
93e6a7e6aa Fix indentation & spaces on map validation files 2017-12-25 23:34:18 +01:00
decabeza
f95d5d4639 improves generic error message 2017-12-22 12:32:34 +01:00
BertoCQ
d534b02b3c Merge pull request #2206 from consul/related-contents-score
Related contents score
2017-12-20 15:13:12 +01:00
BertoCQ
91a88f0b30 Merge pull request #2213 from consul/map-edit
Fix map location update
2017-12-20 14:13:33 +01:00
María Checa
1e23281c28 Fixed related content tests 2017-12-20 13:43:56 +01:00
BertoCQ
44ddd99575 Merge pull request #2201 from wairbut-m2c/aperez-rake-tasks-spec
Add spec for 'rake db:dev_seed' task
2017-12-20 12:57:50 +01:00
rgarcia
7889efd6ee Fix map location update
When editing the map of a proposal or investment(the mappable) the
updated_at attribute of the mappable was not been updated and so the
map still displayed the old location after updating it
2017-12-20 12:43:49 +01:00
Bertocq
f190d9c626 Fix related content score classname on specs 2017-12-20 03:06:53 +01:00
Bertocq
f21f5ec05e Refactor Related Content Controller score methods 2017-12-20 02:36:13 +01:00
María Checa
8e4a39a066 Updated schema and fixed tests 2017-12-19 20:45:23 +01:00
rgarcia
0152b6301c adds specs 2017-12-19 20:36:10 +01:00
María Checa
44f8494079 Fixed tests 2017-12-19 19:40:09 +01:00
María Checa
b99a2eac6f Fixed tests 2017-12-19 19:10:43 +01:00
María Checa
03aaa82d86 Improved tests 2017-12-19 17:01:35 +01:00
María Checa
4192860a73 Added and improved related content tests 2017-12-18 23:56:44 +01:00
María Checa
0fd2b869ce Added tests 2017-12-18 18:22:01 +01:00
María Checa
97f74ac531 Renamed related content times_reported column to flags_count 2017-12-18 18:21:46 +01:00
Angel Perez
cd8d1706f9 Add spec for 'rake db:dev_seed' task 2017-12-18 08:59:39 -04:00
BertoCQ
0bd025962b Merge pull request #2200 from wairbut-m2c/aperez-proposal-recommendations
New scopes for proposal recommendations
2017-12-16 19:58:46 +01:00
Bertocq
70f2ee0cf5 Fix Time.now usage to Time.current to include zone 2017-12-16 17:59:16 +01:00
Bertocq
cf8cfe363b Fix gsub+downcase usage with parameterize 2017-12-16 17:59:16 +01:00
Bertocq
c2b5083d4f Fix missing and extra spacing 2017-12-16 17:59:16 +01:00
Angel Perez
63317714c3 Proposal recommendations won't include archived or already supported proposals 2017-12-15 22:40:24 -04:00
rgarcia
56945d9bbe allows querying for a proposal's votes 2017-12-15 19:21:02 +01:00
Alberto García
cec48c72ef Merge pull request #2195 from consul/milestones_improvements
Make Milestones description required, hide title usage
2017-12-15 18:47:30 +01:00