Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What? Why?
Closes #315.
I forgot to provide the destination of the account in the link to transfer, showed on the offer page. This was fetched in
UsersController#give_time
and later passed to thegive_time
view.When I did the refactor I forgot to move that from https://github.com/coopdevs/timeoverflow/pull/264/files#diff-4e05ad0d64e6100656b63ad1e78f32c5L67 to the appropriate place (the
OffersController#show
), so that we specify the destination in thelink_to
.Introducing view specs 🎉
Since this had to do also with the view, I thought it was the perfect timing to start doing view specs. I've wanted to add them soon to replace the pseudo pattern matching that we ended up doing in some controller specs to ensure stuff in the views.
I figured it'd be faster to get the test I wanted for the view in this way rather than using the current approach in the controller spec. And I was right. Having the capybara RSpec matchers available, such as
have_link
help a lot. You spend less time checking how does the actual returned HTML look like.