diff options
Diffstat (limited to 'spec/lib/gitlab/import_export/json/ndjson_reader_spec.rb')
-rw-r--r-- | spec/lib/gitlab/import_export/json/ndjson_reader_spec.rb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/spec/lib/gitlab/import_export/json/ndjson_reader_spec.rb b/spec/lib/gitlab/import_export/json/ndjson_reader_spec.rb index e208a1c383c..b477ac45577 100644 --- a/spec/lib/gitlab/import_export/json/ndjson_reader_spec.rb +++ b/spec/lib/gitlab/import_export/json/ndjson_reader_spec.rb @@ -67,6 +67,14 @@ RSpec.describe Gitlab::ImportExport::JSON::NdjsonReader do it 'yields nothing to the Enumerator' do expect(subject.to_a).to eq([]) end + + context 'with mark_as_consumed: false' do + subject { ndjson_reader.consume_relation(importable_path, key, mark_as_consumed: false) } + + it 'yields every relation value to the Enumerator' do + expect(subject.count).to eq(1) + end + end end context 'key has not been consumed' do @@ -102,14 +110,4 @@ RSpec.describe Gitlab::ImportExport::JSON::NdjsonReader do end end end - - describe '#clear_consumed_relations' do - let(:dir_path) { fixture } - - subject { ndjson_reader.clear_consumed_relations } - - it 'returns empty set' do - expect(subject).to be_empty - end - end end |