-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If a user is not logged in, instead of erroing is someone is trying to access a member edit page, redirect them to the login page (through GitHub). Fixes rb#465
- Loading branch information
1 parent
aab15b4
commit 278893c
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.describe Member::DetailsController, type: :controller do | ||
describe "GET edit" do | ||
context "When a user is not logged in" do | ||
it "redirects to GitHub authentication" do | ||
get :edit | ||
expect(response).to redirect_to("/auth/github") | ||
end | ||
end | ||
end | ||
end |