-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Extract "following" action from "show" in DashboardsController #2212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract "following" action from "show" in DashboardsController #2212
Conversation
a881693
to
96f496b
Compare
Great 👍 |
@lightalloy there are request specs covering this pretty well (https://github.com/thepracticaldev/dev.to/blob/master/spec/requests/dashboard_spec.rb#L59). Do you feel there's a need for feature specs on top of this? |
@dabrorius Oops, missed these specs somehow, sorry. |
@lightalloy I can add feature specs as part of this PR, but I'm not sure what to test in it. I'd like to avoid adding redundant feature tests as they would slow the test suite down and would not bring any value. What do you feel should be tested in the feature spec that is not already tested in the request spec? |
@dabrorius I reviewed the existing specs again and now I agree with you that probably it's enough to have only requests specs for this functionality. However, I would add checks for the presence of the |
@lightalloy Makes sense, I'll expand the request specs. |
Currently several separate pages are all crammed under `show` action of DashboardsController. This is the first step in an attempt of refactoring that action and separating it into several smaller controller actions.
Add specs for: - asserting tags count exist on 'following' dashboard - asserting users count exist on 'following' dashboard - asserting organizaitons count exist on 'following' dashboard
96f496b
to
db8e26f
Compare
@lightalloy I've added new specs as discussed. I had to re-organize the specs as rubocop started complaining that I'm nesting specs too deep. |
@dabrorius Great! That was not obviously the problem of this pr, but I'm trying to make sure that we increase the test coverage when it's possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks for this!
What type of PR is this? (check all applicable)
Description
Related Tickets & Documents
Currently several separate pages are all crammed under
show
action of DashboardsController.This is the first step in an attempt of refactoring that action and separating it into several smaller controller actions.
Added to documentation?
[optional] What gif best describes this PR or how it makes you feel?