diff options
Diffstat (limited to 'spec/workers/gitlab')
3 files changed, 6 insertions, 5 deletions
diff --git a/spec/workers/gitlab/import/stuck_project_import_jobs_worker_spec.rb b/spec/workers/gitlab/import/stuck_project_import_jobs_worker_spec.rb index 510c41cba21..d12d5a605a7 100644 --- a/spec/workers/gitlab/import/stuck_project_import_jobs_worker_spec.rb +++ b/spec/workers/gitlab/import/stuck_project_import_jobs_worker_spec.rb @@ -10,7 +10,7 @@ RSpec.describe Gitlab::Import::StuckProjectImportJobsWorker do let(:import_state) { create(:project, :import_scheduled).import_state } before do - import_state.update(jid: '123') + import_state.update!(jid: '123') end end end @@ -20,7 +20,7 @@ RSpec.describe Gitlab::Import::StuckProjectImportJobsWorker do let(:import_state) { create(:project, :import_started).import_state } before do - import_state.update(jid: '123') + import_state.update!(jid: '123') end end end diff --git a/spec/workers/gitlab/jira_import/import_issue_worker_spec.rb b/spec/workers/gitlab/jira_import/import_issue_worker_spec.rb index 4a4ef5700fa..324e8010887 100644 --- a/spec/workers/gitlab/jira_import/import_issue_worker_spec.rb +++ b/spec/workers/gitlab/jira_import/import_issue_worker_spec.rb @@ -24,7 +24,8 @@ RSpec.describe Gitlab::JiraImport::ImportIssueWorker do build(:issue, project_id: project.id, title: 'jira issue') .as_json.merge( 'label_ids' => [jira_issue_label_1.id, jira_issue_label_2.id], 'assignee_ids' => assignee_ids - ).compact + ).except('issue_type') + .compact end context 'when any exception raised while inserting to DB' do diff --git a/spec/workers/gitlab/jira_import/stuck_jira_import_jobs_worker_spec.rb b/spec/workers/gitlab/jira_import/stuck_jira_import_jobs_worker_spec.rb index 8271af4db2f..7f1cb8a2076 100644 --- a/spec/workers/gitlab/jira_import/stuck_jira_import_jobs_worker_spec.rb +++ b/spec/workers/gitlab/jira_import/stuck_jira_import_jobs_worker_spec.rb @@ -12,7 +12,7 @@ RSpec.describe ::Gitlab::JiraImport::StuckJiraImportJobsWorker do let(:import_state) { create(:jira_import_state, :scheduled, project: project) } before do - import_state.update(jid: '123') + import_state.update!(jid: '123') end end end @@ -22,7 +22,7 @@ RSpec.describe ::Gitlab::JiraImport::StuckJiraImportJobsWorker do let(:import_state) { create(:jira_import_state, :started, project: project) } before do - import_state.update(jid: '123') + import_state.update!(jid: '123') end end end |