diff options
| author | Jakub Troszok <troszok@gmail.com> | 2012-06-24 22:51:58 +0200 |
|---|---|---|
| committer | Jakub Troszok <troszok@gmail.com> | 2012-06-24 22:51:58 +0200 |
| commit | bea0583951157cc2d1f8923f5b1bc13837aaa24c (patch) | |
| tree | 1f2ee086b424bef25a41ebd583e75fb298722407 /spec/models/user_spec.rb | |
| parent | 56dbfd2af3174a94d0c5ed93a14dd3244370d2f0 (diff) | |
| download | gitlab-ce-bea0583951157cc2d1f8923f5b1bc13837aaa24c.tar.gz | |
Added tests for automatic password generation.
Diffstat (limited to 'spec/models/user_spec.rb')
| -rw-r--r-- | spec/models/user_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 6fe96284eec..5d0b8cd8fdc 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -22,6 +22,12 @@ describe User do user.identifier.should == "test_mail_com" 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 user = Factory(:user) user.authentication_token.should_not == "" |
