| job_spec.rb - warvox - VoIP based wardialing tool, forked from rapid7/warvox. | |
| git clone git://jay.scot/warvox | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| job_spec.rb (751B) | |
| --- | |
| 1 # == Schema Information | |
| 2 # | |
| 3 # Table name: jobs | |
| 4 # | |
| 5 # id :integer not null, primary key | |
| 6 # created_at :datetime | |
| 7 # updated_at :datetime | |
| 8 # project_id :integer not null | |
| 9 # locked_by :string(255) | |
| 10 # locked_at :datetime | |
| 11 # started_at :datetime | |
| 12 # completed_at :datetime | |
| 13 # created_by :string(255) | |
| 14 # task :string(255) not null | |
| 15 # args :binary | |
| 16 # status :string(255) | |
| 17 # error :text | |
| 18 # progress :integer default(0) | |
| 19 # | |
| 20 | |
| 21 require 'rails_helper' | |
| 22 | |
| 23 RSpec.describe Job, type: :model do | |
| 24 it { should belong_to(:project) } | |
| 25 it { should have_many(:calls) } | |
| 26 | |
| 27 it { should validate_presence_of(:project_id) } | |
| 28 | |
| 29 it "valid record" do | |
| 30 expect(build(:job)).to be_valid | |
| 31 end | |
| 32 end |