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

testing not finished........ #44

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

Conversation

leannerivera
Copy link

testing not finished, oauth not working correctly

@dHelmgren
Copy link

MediaRanker Revisted

What We're Looking For

Feature Feedback
General
Appropriate Tests on WorksController incomplete, no authorization testing
Appropriate Tests on SessionsController Good
Appropriate Tests on UsersController Incomplete
Completed OAuth not working, see comments
Basic Authorization (who can see what) cannot assess
Overall It seems like the this and the last project have been a struggle for you. I see that you can write the tests that are necessary, but I would like to talk with you about why these assignments aren't getting done (time, debugging difficulty etc). I want to support you, so if you need extra resources to get back on your feet let's figure out how we can get that for you.

<%= link_to "Log out, #{@current_user.handle}", logout_path, method: :delete, class: "btn btn-primary" %> </li>
<li class="nav-item app-header__nav_item"> <%= link_to "My account", user_path(session[:user_id]), class: "btn btn-primary" %> </li>
<% else %>
<%= link_to "Log In", auth_callback_path, class: "btn btn-primary" %> </li>

Choose a reason for hiding this comment

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

auth_callback_path is not what you use to access the site, it's what the site uses to get back to you about the request. You want something more like <%= link_to "Login with Github", "/auth/github" %>

@@ -1,3 +1,5 @@
<% if logged_in? %>

Choose a reason for hiding this comment

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

It would be much more efficient to use a controller filter to redirect those who aren't logged in. This is not very DRY as a solution.

let(:user) { users(:kari) }

it 'logs a user out' do
perform_login(user)

Choose a reason for hiding this comment

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

what happens if you try to log out when nobody is logged in?

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