This repository has been archived on 2022-08-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
wikiufc/vendor/plugins/shoulda/test/unit/user_test.rb
2008-03-02 16:04:34 -03:00

21 lines
855 B
Ruby

require File.dirname(__FILE__) + '/../test_helper'
class UserTest < Test::Unit::TestCase
load_all_fixtures
should_have_many :posts
should_have_many :dogs
should_not_allow_values_for :email, "blah", "b lah"
should_allow_values_for :email, "a@b.com", "asdf@asdf.com"
should_ensure_length_in_range :email, 1..100
should_ensure_value_in_range :age, 1..100
should_protect_attributes :password
should_have_class_methods :find, :destroy
should_have_instance_methods :email, :age, :email=, :valid?
should_have_db_columns :name, :email, :age
should_have_db_column :id, :type => "integer", :primary => true
should_have_db_column :email, :type => "string", :default => nil, :precision => nil, :limit => 255,
:null => true, :primary => false, :scale => nil, :sql_type => 'varchar(255)'
end