diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 00:07:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 00:07:58 +0300 |
commit | 0f0a8be306e7e0cd5693f57414de351808c41db9 (patch) | |
tree | d392e35e7b45c88de68cc5d433fac5ff98bb8504 /spec/migrations | |
parent | 3fe9588b1c1c4fb58f8ba8e9c27244fc2fc1c103 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/sync_issuables_state_id_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/migrations/sync_issuables_state_id_spec.rb b/spec/migrations/sync_issuables_state_id_spec.rb index 8d1f8a36ac3..c6e4b504bbb 100644 --- a/spec/migrations/sync_issuables_state_id_spec.rb +++ b/spec/migrations/sync_issuables_state_id_spec.rb @@ -19,19 +19,23 @@ describe SyncIssuablesStateId, :migration, :sidekiq do it 'migrates state column to state_id as integer' do opened_issue = issues.create!(description: 'first', state: 'opened') closed_issue = issues.create!(description: 'second', state: 'closed') + unknown_state_issue = issues.create!(description: 'second', state: 'unknown') opened_merge_request = merge_requests.create!(state: 'opened', target_project_id: project.id, target_branch: 'feature1', source_branch: 'master') closed_merge_request = merge_requests.create!(state: 'closed', target_project_id: project.id, target_branch: 'feature2', source_branch: 'master') merged_merge_request = merge_requests.create!(state: 'merged', target_project_id: project.id, target_branch: 'feature3', source_branch: 'master') locked_merge_request = merge_requests.create!(state: 'locked', target_project_id: project.id, target_branch: 'feature4', source_branch: 'master') + unknown_state_merge_request = merge_requests.create!(state: 'unknown', target_project_id: project.id, target_branch: 'feature4', source_branch: 'master') migrate! expect(opened_issue.reload.state_id).to eq(state_ids[:opened]) expect(closed_issue.reload.state_id).to eq(state_ids[:closed]) + expect(unknown_state_issue.reload.state_id).to eq(state_ids[:closed]) expect(opened_merge_request.reload.state_id).to eq(state_ids[:opened]) expect(closed_merge_request.reload.state_id).to eq(state_ids[:closed]) expect(merged_merge_request.reload.state_id).to eq(state_ids[:merged]) expect(locked_merge_request.reload.state_id).to eq(state_ids[:locked]) + expect(unknown_state_merge_request.reload.state_id).to eq(state_ids[:closed]) end end end |