forked from refinery/refinerycms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request refinery#1704 from resolve/username_uniqueness_cas…
…e_insensitivity Fixes refinery#1703
- Loading branch information
Showing
3 changed files
with
18 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,11 @@ module Refinery | |
User.create!(attr) | ||
User.new(attr.merge(:email => "[email protected]")).should_not be_valid | ||
end | ||
|
||
it "rejects duplicate usernames regardless of case" do | ||
User.create!(attr) | ||
User.new(attr.merge(:username => attr[:username].upcase, :email => "[email protected]")).should_not be_valid | ||
end | ||
end | ||
|
||
describe ".find_for_database_authentication" 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