1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

use variables from test setup

This commit is contained in:
Vijay Dev 2011-10-17 19:15:24 +05:30
parent 826a850696
commit 8dffc62a9b

View file

@ -10,15 +10,13 @@ class SecurePasswordTest < ActiveModel::TestCase
end
test "blank password" do
user = User.new
user.password = ''
assert !user.valid?, 'user should be invalid'
@user.password = ''
assert !@user.valid?, 'user should be invalid'
end
test "nil password" do
user = User.new
user.password = nil
assert !user.valid?, 'user should be invalid'
@user.password = nil
assert !@user.valid?, 'user should be invalid'
end
test "password must be present" do