-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Criar modelo de usuário (1/2) #25
base: main
Are you sure you want to change the base?
Conversation
Co-Authored-By: Jhonny Toledo <jhonnytoledo4975@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #25 +/- ##
============================================
+ Coverage 62.50% 100.00% +37.50%
============================================
Files 6 7 +1
Lines 16 17 +1
============================================
+ Hits 10 17 +7
+ Misses 6 0 -6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
Qual é a ideia aqui de 1/2 ? Esse aqui já tem que ter os testes, e não pode diminuir o coverage... Inclusive isso nos mostra que o CI ainda não está validando a cobertura direito, pq nao era nem pra ele aprovar esse PR... depois arrumo isso, mas, to de olho!!!
|
||
class User < ApplicationRecord | ||
devise :database_authenticatable, :registerable, | ||
:recoverable, :rememberable, :validatable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acho que aqui já vale criar as validações do modelo né, campos que queremos que seja obrigatório e único, por exemplo o email..., password (inclusive com tamanho mínimo que se bem me lembro são 8)... etc
# t.string :unlock_token # Only if unlock strategy is :email or :both | ||
# t.datetime :locked_at | ||
|
||
t.string :user_id, null: false, index: { unique: true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esse cara aqui acho que está errado né, pq já é a tabela de usuário, que user_id
seria esse?
t.string "reset_password_token" | ||
t.datetime "reset_password_sent_at" | ||
t.datetime "remember_created_at" | ||
t.string "user_id", null: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realmente tá errado isso aqui...
|
||
FactoryBot.define do | ||
factory :user do | ||
name { '' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cadê o faker aqui? Já cria a factory fazendo ela funcionar bonitinha...
require 'rails_helper' | ||
|
||
RSpec.describe User, type: :model do | ||
pending "add some examples to (or delete) #{__FILE__}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
Qual é o propósito deste Pull Request?
O que foi feito para atingir isso?