2020-03-12 05:09:55 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe ProjectExportJob, type: :model do
|
2020-03-12 05:09:55 -04:00
|
|
|
let(:project) { create(:project) }
|
|
|
|
let!(:job1) { create(:project_export_job, project: project, status: 0) }
|
|
|
|
let!(:job2) { create(:project_export_job, project: project, status: 2) }
|
|
|
|
|
|
|
|
describe 'associations' do
|
|
|
|
it { expect(job1).to belong_to(:project) }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'validations' do
|
|
|
|
it { expect(job1).to validate_presence_of(:project) }
|
|
|
|
it { expect(job1).to validate_presence_of(:jid) }
|
|
|
|
it { expect(job1).to validate_presence_of(:status) }
|
|
|
|
end
|
|
|
|
end
|