diff options
author | James Lopez <james@jameslopez.es> | 2016-06-13 21:18:26 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-06-13 21:18:26 +0200 |
commit | 4020b0f55fa7df3a410a11debfd155527b1a79ee (patch) | |
tree | 93cbfcc21675ed584cd830e7c6b2b244acbae707 /spec/lib/gitlab/import_export/reader_spec.rb | |
parent | bd5c749f2911e9d843a5bfe7487fdc1566c5dfa6 (diff) | |
download | gitlab-ce-4020b0f55fa7df3a410a11debfd155527b1a79ee.tar.gz |
few changes based on MR feedback
Diffstat (limited to 'spec/lib/gitlab/import_export/reader_spec.rb')
-rw-r--r-- | spec/lib/gitlab/import_export/reader_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/lib/gitlab/import_export/reader_spec.rb b/spec/lib/gitlab/import_export/reader_spec.rb new file mode 100644 index 00000000000..f16b4f8e2bd --- /dev/null +++ b/spec/lib/gitlab/import_export/reader_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +describe Gitlab::ImportExport::Reader, lib: true do + let(:shared) { Gitlab::ImportExport::Shared.new(relative_path:'') } + let(:test_config) { 'spec/support/import_export/import_export.yml' } + let(:project_tree_hash) do + { + only: [:name, :path], + include: [:issues, :labels, + { merge_requests: { + only: [:id], + except: [:iid], + include: [:merge_request_diff, :merge_request_test] + } }, + { commit_statuses: { include: :commit } }] + } + end + + before do + allow_any_instance_of(Gitlab::ImportExport).to receive(:config_file).and_return(test_config) + end + + it 'generates hash from project tree config' do + expect(described_class.new(shared: shared).project_tree).to match(project_tree_hash) + end +end |