-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Add a downcased_logins feature, for normalizing logins to dow…
…ncase by default" This reverts commit eabfa69. Instead of having a separate feature for this simple configuration change, we can just point people to the guide added in the previous commit.
- Loading branch information
1 parent
9a5fd58
commit 5de5d68
Showing
7 changed files
with
0 additions
and
67 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -142,48 +142,6 @@ | |
page.current_path.must_equal '/create-account' | ||
end | ||
|
||
it "should not allow creation of account differing in case" do | ||
rodauth do | ||
enable :create_account | ||
enable :downcased_logins if DB.database_type == :sqlite | ||
end | ||
roda do |r| | ||
r.rodauth | ||
next unless rodauth.logged_in? | ||
r.root{view :content=>"Logged In: #{DB[:accounts].where(:id=>rodauth.session_value).get(:email)}"} | ||
end | ||
|
||
visit '/create-account' | ||
fill_in 'Login', :with=>'[email protected]' | ||
fill_in 'Confirm Login', :with=>'[email protected]' | ||
fill_in 'Password', :with=>'apple2' | ||
fill_in 'Confirm Password', :with=>'apple2' | ||
click_button 'Create Account' | ||
page.html.must_include("invalid login, already an account with this login") | ||
page.find('#error_flash').text.must_equal "There was an error creating your account" | ||
page.current_path.must_equal '/create-account' | ||
end | ||
|
||
it "should work with the downcased_logins feature" do | ||
rodauth do | ||
enable :create_account, :downcased_logins | ||
end | ||
roda do |r| | ||
r.rodauth | ||
next unless rodauth.logged_in? | ||
r.root{view :content=>"Logged In: #{DB[:accounts].where(:id=>rodauth.session_value).get(:email)}"} | ||
end | ||
|
||
visit '/create-account' | ||
fill_in 'Login', :with=>'[email protected]' | ||
fill_in 'Confirm Login', :with=>'[email protected]' | ||
fill_in 'Password', :with=>'apple2' | ||
fill_in 'Confirm Password', :with=>'apple2' | ||
click_button 'Create Account' | ||
DB[:accounts].select_map(:email).must_include '[email protected]' | ||
page.html.must_include("Logged In: [email protected]") | ||
end | ||
|
||
it "should not display create account link on login page if route is disabled" do | ||
route = 'create-account' | ||
rodauth do | ||
|
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