-
Notifications
You must be signed in to change notification settings - Fork 47
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
base: master
Are you sure you want to change the base?
Conversation
MediaRanker RevistedWhat We're Looking For
|
<%= 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> |
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.
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? %> |
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.
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) |
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.
what happens if you try to log out when nobody is logged in?
testing not finished, oauth not working correctly