aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/user_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
new file mode 100644
index 000000000..879006b4b
--- /dev/null
+++ b/spec/models/user_spec.rb
@@ -0,0 +1,15 @@
+require File.dirname(__FILE__) + '/../spec_helper'
+
+describe User, " when authenticating" do
+
+ before do
+ @user = User.new
+ end
+
+ it "should create a hashed password when the password is set" do
+ @user.hashed_password.should be_nil
+ @user.password = "a test password"
+ @user.hashed_password.should_not be_nil
+ end
+
+end \ No newline at end of file