demarches-normaliennes/spec/models/user_spec.rb

22 lines
891 B
Ruby
Raw Normal View History

2015-09-23 10:02:01 +02:00
require 'rails_helper'
describe User, type: :model do
describe 'database columns' do
it { is_expected.to have_db_column(:email) }
it { is_expected.to have_db_column(:encrypted_password) }
it { is_expected.to have_db_column(:reset_password_token) }
it { is_expected.to have_db_column(:reset_password_sent_at) }
it { is_expected.to have_db_column(:remember_created_at) }
it { is_expected.to have_db_column(:sign_in_count) }
it { is_expected.to have_db_column(:current_sign_in_at) }
it { is_expected.to have_db_column(:last_sign_in_at) }
it { is_expected.to have_db_column(:current_sign_in_ip) }
it { is_expected.to have_db_column(:last_sign_in_ip) }
it { is_expected.to have_db_column(:created_at) }
it { is_expected.to have_db_column(:updated_at) }
end
2015-09-23 12:16:21 +02:00
describe 'associations' do
it { is_expected.to have_many(:dossiers) }
end
2015-09-23 10:02:01 +02:00
end