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:
parent
826a850696
commit
8dffc62a9b
1 changed files with 4 additions and 6 deletions
|
@ -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 a new issue