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:
authorOswaldo Ferreira <oswaldo@gitlab.com>2018-05-28 23:18:43 +0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2018-05-30 17:51:29 +0300
commit54ad5fb8a2b9e90a83cd5714d935b8ea0664eb03 (patch)
treef8e3e0d4b5edde851a372d6d1bda479b88e0d29b /spec/lib/gitlab/import_export/relation_factory_spec.rb
parenta8c97187f07cc4feeec9347967a12680cf5aec37 (diff)
Take two for MR metrics population background migration
Diffstat (limited to 'spec/lib/gitlab/import_export/relation_factory_spec.rb')
-rw-r--r--spec/lib/gitlab/import_export/relation_factory_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/lib/gitlab/import_export/relation_factory_spec.rb b/spec/lib/gitlab/import_export/relation_factory_spec.rb
index 5f0dfd64b15..cf9e0f71910 100644
--- a/spec/lib/gitlab/import_export/relation_factory_spec.rb
+++ b/spec/lib/gitlab/import_export/relation_factory_spec.rb
@@ -119,6 +119,25 @@ describe Gitlab::ImportExport::RelationFactory do
end
end
+ context 'overrided model with pluralized name' do
+ let(:relation_sym) { :metrics }
+
+ let(:relation_hash) do
+ {
+ 'id' => 99,
+ 'merge_request_id' => 99,
+ 'merged_at' => Time.now,
+ 'merged_by_id' => 99,
+ 'latest_closed_at' => nil,
+ 'latest_closed_by_id' => nil
+ }
+ end
+
+ it 'does not raise errors' do
+ expect { created_object }.not_to raise_error
+ end
+ end
+
context 'Project references' do
let(:relation_sym) { :project_foo_model }
let(:relation_hash) do