Skip to content
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

Octos- Ari- MediaRanker Revisited #33

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

arrriiii
Copy link

@arrriiii arrriiii commented May 1, 2018

No description provided.

@droberts-sea
Copy link

MediaRanker Revisted

What We're Looking For

Feature Feedback
General
Tests on WorksController mostly
Tests on SessionsController mostly
Tests on UsersController mostly
Completed OAuth yes
Overall From a high level the tests you've written look good, and it seems like your concept of what to test is on track. However, because your tests weren't running they ended up drifting out of sync with your code, and once I fixed the root problem many of them were failing.

In the future, this is exactly the sort of thing it would be wise to seek instructor help on, since 10 minutes of searching on my part might prevent many hours of you being stuck. Even on a weekend I'm pretty good about responding to Slack messages.

@@ -2,6 +2,7 @@ class WorksController < ApplicationController
# We should always be able to tell what category
# of work we're dealing with
before_action :category_from_work, except: [:root, :index, :new, :create]
before_action :require_login, except: [:root]

def root

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've also added require_login as a filter on the ApplicationController, which means it will happen before every single controller action. Your line 5 here adds it again for everything but root, but doesn't take it away for root. Instead it should be a skip_before_action for only :root.

This is also why all your WorksController tests were breaking.

This was a tricky one - it took me a while to figure out what was going on 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants