diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-12 12:09:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-12 12:09:55 +0300 |
commit | 18f7828977b74bf6e5153594a098ef90e773b3b7 (patch) | |
tree | 49cb1e16d5341d773807ee583357ae6eb167d61f /spec/models/project_export_job_spec.rb | |
parent | 8191b1571c017378eac33b3ed296ad5216d0a410 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/project_export_job_spec.rb')
-rw-r--r-- | spec/models/project_export_job_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/models/project_export_job_spec.rb b/spec/models/project_export_job_spec.rb new file mode 100644 index 00000000000..dc39d0e401d --- /dev/null +++ b/spec/models/project_export_job_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'spec_helper' + +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 |