diff options
author | Valery Sizov <valery@gitlab.com> | 2016-12-19 20:44:57 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-12-19 20:48:08 +0200 |
commit | 5b0ebbe5b4c18c136aad2a53898c1a6441d39a9d (patch) | |
tree | a984bf0c2ff5fa499ae66a01e266c1c04bec4799 /spec/lib/gitlab/bitbucket_import/importer_spec.rb | |
parent | 2c49c1af660a8e69446be442df81f9beaf0cf168 (diff) | |
download | gitlab-ce-5b0ebbe5b4c18c136aad2a53898c1a6441d39a9d.tar.gz |
Add Wiki import to BB importer
Diffstat (limited to 'spec/lib/gitlab/bitbucket_import/importer_spec.rb')
-rw-r--r-- | spec/lib/gitlab/bitbucket_import/importer_spec.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/lib/gitlab/bitbucket_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_import/importer_spec.rb index 53f3c73ade4..72b1ba36b58 100644 --- a/spec/lib/gitlab/bitbucket_import/importer_spec.rb +++ b/spec/lib/gitlab/bitbucket_import/importer_spec.rb @@ -69,6 +69,9 @@ describe Gitlab::BitbucketImport::Importer, lib: true do context 'issues statuses' do before do + # HACK: Bitbucket::Representation.const_get('Issue') seems to return ::Issue without this + Bitbucket::Representation::Issue.new({}) + stub_request( :get, "https://api.bitbucket.org/2.0/repositories/#{project_identifier}" @@ -108,13 +111,16 @@ describe Gitlab::BitbucketImport::Importer, lib: true do body: {}.to_json) end - it 'map statuses to open or closed' do - # HACK: Bitbucket::Representation.const_get('Issue') seems to return ::Issue without this - Bitbucket::Representation::Issue.new({}) + it 'maps statuses to open or closed' do importer.execute expect(project.issues.where(state: "closed").size).to eq(5) expect(project.issues.where(state: "opened").size).to eq(2) end + + it 'calls import_wiki' do + expect(importer).to receive(:import_wiki) + importer.execute + end end end |