Welcome to mirror list, hosted at ThFree Co, Russian Federation.

project_export_job_spec.rb « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5a2b1443f8b2ab243233483687566c6c405c13c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe ProjectExportJob, type: :model do
  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