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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/project_export_job_spec.rb')
-rw-r--r--spec/models/project_export_job_spec.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/models/project_export_job_spec.rb b/spec/models/project_export_job_spec.rb
index 5a2b1443f8b..653d4d2df27 100644
--- a/spec/models/project_export_job_spec.rb
+++ b/spec/models/project_export_job_spec.rb
@@ -3,17 +3,14 @@
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) }
+ it { is_expected.to belong_to(:project) }
+ it { is_expected.to have_many(:relation_exports) }
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) }
+ it { is_expected.to validate_presence_of(:project) }
+ it { is_expected.to validate_presence_of(:jid) }
+ it { is_expected.to validate_presence_of(:status) }
end
end