summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb')
-rw-r--r--spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb b/spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb
index d23b27c9d8e..934e676d020 100644
--- a/spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb
+++ b/spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb
@@ -1,7 +1,12 @@
require 'spec_helper'
describe Gitlab::ImportExport::FastHashSerializer do
- subject { described_class.new(project, tree).execute }
+ # FastHashSerializer#execute generates the hash which is not easily accessible
+ # and includes `JSONBatchRelation` items which are serialized at this point.
+ # Wrapping the result into JSON generating/parsing is for making
+ # the testing more convenient. Doing this, we can check that
+ # all items are properly serialized while traversing the simple hash.
+ subject { JSON.parse(JSON.generate(described_class.new(project, tree).execute)) }
let!(:project) { setup_project }
let(:user) { create(:user) }