Introduction
Introduction Statistics Contact Development Disclaimer Help
provider_spec.rb - warvox - VoIP based wardialing tool, forked from rapid7/warv…
git clone git://jay.scot/warvox
Log
Files
Refs
README
---
provider_spec.rb (1129B)
---
1 # == Schema Information
2 #
3 # Table name: providers
4 #
5 # id :integer not null, primary key
6 # created_at :datetime
7 # updated_at :datetime
8 # name :text not null
9 # host :text not null
10 # port :integer not null
11 # user :text
12 # pass :text
13 # lines :integer default(1), not null
14 # enabled :boolean default(TRUE)
15 #
16
17 require 'rails_helper'
18
19 RSpec.describe Provider, type: :model do
20 ## TODO determine if association is unecessary
21 # the DialResult model does not exist
22 #it { should have_many(:dial_results) }
23
24 it { should validate_presence_of(:name) }
25 it { should validate_presence_of(:host) }
26 it { should validate_presence_of(:port) }
27 it { should validate_presence_of(:user) }
28 it { should validate_presence_of(:pass) }
29 it { should validate_presence_of(:lines) }
30 it { should validate_numericality_of(:port).is_less_than(65536).is_gre…
31 it { should validate_numericality_of(:lines).is_less_than(255).is_grea…
32
33 it "valid record" do
34 expect(build(:provider)).to be_valid
35 end
36 end
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.