Fix broken Yahoo! signup.

This commit is contained in:
Robin Ward
2013-02-13 12:36:59 -05:00
parent f850fe1e75
commit f00006ee7d
3 changed files with 14 additions and 2 deletions

View File

@ -394,6 +394,11 @@ describe User do
end
describe '.suggest_username' do
it "doesn't raise an error on nil username" do
User.suggest_username(nil).should be_nil
end
it 'corrects weird characters' do
User.suggest_username("Darth%^Vadar").should == "Darth_Vadar"
end