diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-14 23:22:14 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-14 23:22:14 +0200 |
commit | 9d00bb08962e26b0c284bcfc5e7ed52cf141d5c6 (patch) | |
tree | 782f7f8e1223ffa27e7c34a589492c6d46e6ba2c /spec/lib/gitlab/google_code_import/importer_spec.rb | |
parent | 2f797a140b9e4c2a5cc6b86b923cd3ff70e6d7e9 (diff) | |
download | gitlab-ce-9d00bb08962e26b0c284bcfc5e7ed52cf141d5c6.tar.gz |
Import Google Code issue assignee when mapped.google-code-import
Diffstat (limited to 'spec/lib/gitlab/google_code_import/importer_spec.rb')
-rw-r--r-- | spec/lib/gitlab/google_code_import/importer_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/lib/gitlab/google_code_import/importer_spec.rb b/spec/lib/gitlab/google_code_import/importer_spec.rb index a68f69d337c..107ba49962a 100644 --- a/spec/lib/gitlab/google_code_import/importer_spec.rb +++ b/spec/lib/gitlab/google_code_import/importer_spec.rb @@ -1,20 +1,22 @@ require "spec_helper" describe Gitlab::GoogleCodeImport::Importer do + let(:mapped_user) { create(:user, username: "thilo123") } let(:raw_data) { JSON.parse(File.read(Rails.root.join("spec/fixtures/GoogleCodeProjectHosting.json"))) } let(:client) { Gitlab::GoogleCodeImport::Client.new(raw_data) } let(:import_data) { { "repo" => client.repo("tint2").raw_data, "user_map" => { - "thilo..." => "@thilo123" + "thilo..." => "@#{mapped_user.username}" } } } let(:project) { create(:project, import_data: import_data) } - subject { described_class.new(project) } + subject { described_class.new(project) } describe "#execute" do + it "imports status labels" do subject.execute @@ -43,6 +45,8 @@ describe Gitlab::GoogleCodeImport::Importer do issue = project.issues.first expect(issue).to_not be_nil expect(issue.iid).to eq(169) + expect(issue.author).to eq(project.creator) + expect(issue.assignee).to eq(mapped_user) expect(issue.state).to eq("closed") expect(issue.label_names).to include("Priority: Medium") expect(issue.label_names).to include("Status: Fixed") @@ -65,7 +69,7 @@ describe Gitlab::GoogleCodeImport::Importer do note = project.issues.first.notes.first expect(note).to_not be_nil expect(note.note).to include("Comment 1") - expect(note.note).to include("@thilo123") + expect(note.note).to include("@#{mapped_user.username}") expect(note.note).to include("November 18, 2009 05:14") expect(note.note).to include("applied, thanks.") expect(note.note).to include("Status: Fixed") |