Skip to content

Commit

Permalink
fixed rspec failure (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
dasolyoon authored Nov 16, 2016
1 parent adbd86a commit fd651ed
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/controllers/session_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class SessionController < ApplicationController

skip_before_filter :authenticate, :except => ['destroy']
skip_before_filter :check_existence

def new
id = session[:user_id]
Expand Down Expand Up @@ -35,7 +36,7 @@ def create
def destroy
session[:user_id] = nil
session[:is_admin] = nil
redirect_to root_url, notice: "Logged out!"
redirect_to login_path, notice: "Logged out!"
end

end
2 changes: 1 addition & 1 deletion features/redirect.feature
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Feature: go to the correct page
And I fill in "Password" with "mypassword"
And I press "Log In"
Then I follow "Logout"
Then I should be on the home page
Then I should be on the login page

Scenario: Prevents access to team page when no one is signed in
Given I am on the team "1" page
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/admins_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

Admin.find_by_id(1).destroy!
get :show, {:id => 1}
response.should redirect_to(login_path)
response.should redirect_to(logout_path)
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/users_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

User.find_by_id(1).destroy!
post :start_team
response.should redirect_to(login_path)
response.should redirect_to(logout_path)
end
end

Expand Down

0 comments on commit fd651ed

Please sign in to comment.