removes user_id column from User model to use idiomatic Rails automatic IDs
This commit is contained in:
@@ -6,13 +6,16 @@ class UserFixture
|
||||
end
|
||||
|
||||
def self.normal_user
|
||||
password = "thi$ 1s cOmplExEr"
|
||||
user = User.new(first_name: "Joe", last_name: "Schmoe",
|
||||
email: "joe@schmoe.com", password: password, password_confirmation: password)
|
||||
def user.clear_password
|
||||
"thi$ 1s cOmplExEr"
|
||||
password = 'thi$ 1s cOmplExEr'
|
||||
User.create!(first_name: 'Joe', last_name: 'Schmoe', email: 'joe@schmoe.com',
|
||||
password: password, password_confirmation: password).tap do |user|
|
||||
def user.clear_password
|
||||
'thi$ 1s cOmplExEr'
|
||||
end
|
||||
end
|
||||
user.save!
|
||||
user
|
||||
end
|
||||
|
||||
def self.admin_user
|
||||
User.where(admin: true).first
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user