Now factories define default headings for investments, so there's no
need to create a group and a heading to create an investment.
Likewise, in order to create a heading it isn't necessary to specify a
group anymore; specifying the budget is enough.
It's possible that there are more similar cases we haven't simplified
yet; I'm only addressing the obvious ones.
The `type: :feature` is automatically detected by RSpec because these
tests are inside the `spec/features` folder. Using `feature` re-adds a
`type: :feature` to these files, which will result in a conflict when we
upgrade to Rails 5.1's system tests.
Because of this change, we also need to change `background` to `before`
or else these tests will fail.
Eventhough some of us sentimentals still like the syntax `to_not` the current trend is to move to the new syntax `not_to`.
In this commit we are updating the references of expectations that used `to_not` to `not_to`.
Why:
Sometimes the latitude or longitude it passed to the map as *********
instead of the actual latitude or longitud. The asterisks are not a
string, breaking the whole array
https://github.com/consul/consul/issues/2380
What:
This commits skips invalid markers and displays the rest
How:
- Substituting the mysterious asterisks for null
(cleanInvestmentCoordinates)
- Validating the coordinates are numbers before trying to pain
them(validCoordinates)
- Adding a numeric function to validate the latitude and longitude
(isNumeric)
https://stackoverflow.com/questions/9716468/is-there-any-function-like-i
snumeric-in-javascript-to-validate-numbers#answer-9716488
When there are no budgets we were seeing an exception in the budgets’
index
There are two parts to take into account here:
1) Making sure there is a current_budget present, otherwise we display
the “no budgets” message
2) The map helper is called from the controller, so we need to make
sure current_budget is present there too
Note: We could have added a bunch of `try` statements in the budgets’s
index, instead of using a conditional, however there are quite a few
`current_budget` calls so it seems more appropriate to use a conditional
Budget's home page has changed, no longer we'll be showing a list of
active budgets, but only one current (open) budget and a list of
finished ones.
So no need to create 3 budgets in a row, but a finished budget (because
we already have a valid budget created)