user_spec.rb - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
(HTM) git clone git://jay.scot/warvox
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
user_spec.rb (1188B)
---
1 # == Schema Information
2 #
3 # Table name: users
4 #
5 # id :integer not null, primary key
6 # login :string(255) not null
7 # email :string(255)
8 # crypted_password :string(255) not null
9 # password_salt :string(255) not null
10 # persistence_token :string(255) not null
11 # single_access_token :string(255) not null
12 # perishable_token :string(255) not null
13 # login_count :integer default(0), not null
14 # failed_login_count :integer default(0), not null
15 # last_request_at :datetime
16 # current_login_at :datetime
17 # last_login_at :datetime
18 # current_login_ip :string(255)
19 # last_login_ip :string(255)
20 # created_at :datetime
21 # updated_at :datetime
22 # enabled :boolean default(TRUE)
23 # admin :boolean default(TRUE)
24 #
25
26 require 'rails_helper'
27
28 RSpec.describe User, type: :model do
29 it { should validate_length_of(:password).is_at_least(8) }
30 it { should validate_length_of(:password_confirmation).is_at_least(8) }
31
32 it 'valid record' do
33 expect(build(:user)).to be_valid
34 end
35 end