Commit bea05839 authored by Jakub Troszok's avatar Jakub Troszok

Added tests for automatic password generation.

parent 56dbfd2a
...@@ -22,6 +22,12 @@ describe User do ...@@ -22,6 +22,12 @@ describe User do
user.identifier.should == "test_mail_com" user.identifier.should == "test_mail_com"
end end
it "should generate password when password is empty" do
user = User.create(:email => "test1@mail.com")
user.password.should eql(user.password_confirmation)
user.password.should_not be_empty
end
it "should have authentication token" do it "should have authentication token" do
user = Factory(:user) user = Factory(:user)
user.authentication_token.should_not == "" user.authentication_token.should_not == ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment