Commit Graph

74 Commits

Author SHA1 Message Date
Bertocq
900d8a00b1 Make milestone's description a required attribute 2017-12-15 16:38:21 +01:00
rgarcia
2b52d26d82 refactors notifications into concerns and shared examples 2017-12-14 16:15:30 +01:00
iagirre
aed0013e79 Spec fixed 2017-10-31 15:54:17 +01:00
iagirre
bfcbb6c0ad Validation in model and in form added. When users makes the on focus on population field an explanation appears. Some specs added to test the model validations 2017-10-31 13:04:30 +01:00
Senén Rodero Rodríguez
6f71da07ee Duplicate documentable code and rename for imageable 2017-09-26 13:55:03 +02:00
Bertocq
614ff79ba1 WIP 2017-09-26 13:53:43 +02:00
Senén Rodero Rodríguez
5ecf228b09 Add spec to check image attachment destroy method on budget investment model. 2017-09-26 13:53:43 +02:00
Senén Rodero Rodríguez
a9f1d41179 Fix some specs names 2017-09-26 13:53:42 +02:00
Senén Rodero Rodríguez
c914c772c0 Add budget investment image dimmensions validator. 2017-09-26 13:53:42 +02:00
Senén Rodero Rodríguez
515d6d7e70 Rename image_description column to image_title on budget investments. 2017-09-26 13:53:42 +02:00
Senén Rodero Rodríguez
c399692109 Add image description to budget investments 2017-09-26 13:53:42 +02:00
Senén Rodero Rodríguez
4f5a552486 Added image content type validation to only allowing jpg images. 2017-09-26 13:53:42 +02:00
Bertocq
7e4d9b749b Fix Style/ColonMethodCall rubocop issues 2017-09-25 22:53:15 +02:00
Bertocq
22822aa173 Fix Style/RedundantParentheses rubocop issues 2017-09-25 22:44:58 +02:00
Bertocq
2b85deabec Recalculate heading winners on incompatibility change
Why:

* We should recalculate winners also when an incompatible investment is flagged as compatible again

How:

* Removing the condition to recalculate that was checking only for a winner investment flagged as incompatible
* Extending the Budget::Result model spec to cover that new scenario
2017-07-10 14:24:55 +02:00
BertoCQ
e990568895 Merge pull request #1721 from consul/feature/add_slugs_to_budget_related
Add slugs to budget related
2017-07-05 13:16:24 +02:00
Bertocq
512059e021 Increase Budget, Heading and Group model specs to cover slug uniqueness
Why:

* Slug must be unique among:
 1. Budget slug: among other budgets
 2. Group slug: among other groups from its budget
 3. Heading slug: among other headings from all the groups from its budget

How:

* Adding checks for all possible scenarios on each model specs
2017-07-05 12:33:17 +02:00
Bertocq
28970c6701 Fix all Style/UnneededInterpolation rubocop issues and remove from rubocop_tod 2017-07-04 22:44:08 +02:00
Bertocq
73e0a5a88d Add to Budget Budget::Heading Budget::Group specs the sluggable shared example
Why:

* Those classes have a slug attribute that needs to be filled

How:

* Just adding the shared example to Budget model spec, and creating the model spec file for Heading and Group to include it as well
2017-07-04 18:40:54 +02:00
Bertocq
21864f3fb5 Increase Budget Result spec to check incompatible investments can't be winners
Why:

* A incompatible investment can't be chosen as a winner
* When a winner investment is marked as incompatible, winnersmust be recalculated and it can't be a winner

How:

* Increasing existing scenarios to include a incompatible investment
* Adding a new scenario where a winner investment gets flagged as incompatible
2017-07-03 15:59:01 +02:00
Bertocq
775da2d581 Remove all Layout/EmptyLines issues on code and file list from rubocop_todo 2017-06-28 14:12:51 +02:00
Bertocq
e6dd33bd66 Fix all Layout/SpaceAfterComma issues and remove from rubocop_todo list 2017-06-26 17:57:53 +02:00
Bertocq
6562d8b9d8 Fix all Layout/SpaceBeforeFirstArg rubocop issues and remove from rubocop_todo list 2017-06-26 17:57:53 +02:00
taitus
2fe663ef8f Fix syntax and indentation errors. 2017-06-24 22:38:48 +02:00
taitus
f220952883 Add CRUD Milestone on Admin::BudgetInvestment. Rename Checkpoint to Milestone. 2017-06-24 22:38:48 +02:00
taitus
beeb5412d7 New Checkpoint model. Update factories. Model specs. 2017-06-24 22:38:48 +02:00
decabeza
0e581896c0 improves message when not enough money 2017-05-26 17:12:21 +02:00
rgarcia
0b68f3c619 cleans up 2017-05-19 14:07:30 +02:00
rgarcia
65eb2bb160 adds budget result specs 2017-05-19 14:04:46 +02:00
Juanjo Bazán
f0d7acd087 Merge pull request #1550 from consul/budgets-unfeasible
Investments reclassified as unfeasible
2017-05-18 14:37:32 +02:00
rgarcia
a63ca9649e cleans up 2017-05-17 20:32:05 +02:00
Juanjo Bazán
d08af6193e changes unselected scope to include undecided feasibility 2017-05-17 15:13:29 +02:00
rgarcia
42f62e5c36 stores reclassified votes 2017-05-17 15:13:28 +02:00
rgarcia
84f63c7a6f fixes specs 2017-05-14 19:19:05 +02:00
rgarcia
62b2f4812b fixes false positive when storing previous heading id 2017-05-14 11:38:05 +02:00
rgarcia
1ca16d9d40 removes votes from reclassified investments 2017-05-13 13:10:04 +02:00
Juanjo Bazán
04b95df696 Merge pull request #1514 from consul/budgets-ballot-db-constraint
Adds DB constraint to avoid duplicate balloted investments
2017-05-10 12:29:46 +02:00
rgarcia
fa825185f5 adds model specs for investment filters 2017-05-06 03:37:11 +02:00
rgarcia
767a43bb0f Adds DB constraint to avoid duplicate balloted investments 2017-05-03 18:43:22 +02:00
rgarcia
8083f259c2 takes into account headings without balloted investments 2017-05-03 17:49:29 +02:00
rgarcia
2f6c1bc7bc displays the correct amount spent in review my ballot
returns the first heading with investments for a group
2017-05-03 17:06:27 +02:00
Juanjo Bazán
3f04854626 adds missing method specs 2017-04-17 13:17:01 +02:00
Juanjo Bazán
61e5c187da shows investment price info only if phase is balloting or later 2017-04-17 13:15:17 +02:00
Juanjo Bazán
3c2ab9fb05 adds validation for price when investment is feasible 2017-03-27 13:14:26 +02:00
Juanjo Bazán
e64cf012e7 Merge pull request #1446 from consul/budget-permissions
adds comprehensive specs for permissions to vote an investment
2017-03-21 13:48:01 +01:00
Juanjo Bazán
b8b7cda4e6 keeps Budget::Investment's group in sync with heading 2017-03-16 14:30:31 +01:00
rgarcia
85c5e584fb adds comprehensive specs for permissions to vote an investment 2017-03-15 18:49:17 +01:00
rgarcia
537de8c46c Merge branch 'master' into budget-emails 2017-01-15 18:58:20 +01:00
rgarcia
7aba8ef299 adds specs 2017-01-14 17:02:45 +01:00
Raimond Garcia
4c818bfcc4 Merge pull request #1349 from consul/budgets-vote-permissions
User permissions for selecting phase
2017-01-13 18:34:31 +01:00