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.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index 9501d34..02e94df 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -71,6 +71,13 @@ class UserTest < ActiveSupport::TestCase
assert_equal key, @user.public_key
end
+ test "user to hash includes id, login, valid and enabled" do
+ hash = @user.to_hash
+ assert_equal @user.id, hash[:id]
+ assert_equal @user.valid?, hash[:ok]
+ assert_equal @user.login, hash[:login]
+ assert_equal @user.enabled?, hash[:enabled]
+ end
#