mirror of https://github.com/rails/rails
use variables from test setup
This commit is contained in:
parent
826a850696
commit
8dffc62a9b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue