OSDN Git Service
(root)
/
wvm
/
gitlab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56dbfd2
)
Added tests for automatic password generation.
author
Jakub Troszok
<troszok@gmail.com>
Sun, 24 Jun 2012 20:51:58 +0000
(22:51 +0200)
committer
Jakub Troszok
<troszok@gmail.com>
Sun, 24 Jun 2012 20:51:58 +0000
(22:51 +0200)
spec/models/user_spec.rb
patch
|
blob
|
history
diff --git
a/spec/models/user_spec.rb
b/spec/models/user_spec.rb
index
6fe9628
..
5d0b8cd
100644
(file)
--- 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 == ""