normal_user:
id: 1
email: test@openstreetmap.org
- active: true
+ status: active
pass_crypt: <%= Digest::MD5.hexdigest('test') %>
creation_time: "2007-01-01 00:00:00"
display_name: test
public_user:
id: 2
email: test@example.com
- active: true
+ status: active
pass_crypt: <%= Digest::MD5.hexdigest('test') %>
creation_time: "2008-05-01 01:23:45"
display_name: test2
inactive_user:
id: 3
email: inactive@openstreetmap.org
- active: false
+ status: pending
pass_crypt: <%= Digest::MD5::hexdigest('test2') %>
creation_time: "2008-07-01 02:23:45"
display_name: Inactive User
second_public_user:
id: 4
email: public@OpenStreetMap.org
- active: true
+ status: active
pass_crypt: <%= Digest::MD5.hexdigest('test') %>
creation_time: "2008-05-01 01:23:45"
display_name: pulibc_test2
moderator_user:
id: 5
email: moderator@example.com
- active: true
+ status: active
pass_crypt: <%= Digest::MD5.hexdigest('test') %>
creation_time: "2008-05-01 01:23:45"
display_name: moderator
administrator_user:
id: 6
email: administrator@example.com
- active: true
+ status: active
pass_crypt: <%= Digest::MD5.hexdigest('test') %>
creation_time: "2008-05-01 01:23:45"
display_name: administrator
+# -*- coding: utf-8 -*-
require File.dirname(__FILE__) + '/../test_helper'
class UserTest < ActiveSupport::TestCase
def test_unique_email
new_user = User.new(:email => users(:normal_user).email,
- :active => 1,
+ :status => "active",
:pass_crypt => Digest::MD5.hexdigest('test'),
:display_name => "new user",
:data_public => 1,
def test_unique_display_name
new_user = User.new(:email => "tester@openstreetmap.org",
- :active => 0,
+ :status => "pending",
:pass_crypt => Digest::MD5.hexdigest('test'),
:display_name => users(:normal_user).display_name,
:data_public => 1,