I a newbie in test-unit . I need to verify that email of the user is unique in the users table
require 'test_helper'
class UserTest < ActiveSupport::TestCase
def setup
@usuario = User.new
@usuario.email="pepe@hotmail.com"
@usuario.password="123456"
end
test "Verify that user email is unique" do
end
end
Aucun commentaire:
Enregistrer un commentaire