summaryrefslogtreecommitdiff
path: root/test/unit/user_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/user_test.rb')
-rw-r--r--test/unit/user_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index b3c831b..9501d34 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -4,9 +4,15 @@ class UserTest < ActiveSupport::TestCase
include SRP::Util
setup do
+ InviteCodeValidator.any_instance.stubs(:validate)
@user = FactoryGirl.build(:user)
end
+ test "don't find a user with login nil" do
+ @user.save
+ assert_nil User.find_by_login(nil)
+ end
+
test "design docs in database are authorative" do
assert !User.design_doc.auto_update,
"Automatic update of design docs should be disabled"
@@ -65,6 +71,8 @@ class UserTest < ActiveSupport::TestCase
assert_equal key, @user.public_key
end
+
+
#
## Regression tests
#