summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/bitbucket_import
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-11-21 20:58:46 -0800
committerStan Hu <stanhu@gmail.com>2016-11-21 20:58:46 -0800
commitfc40c3f28a67ecafa58191c0cd6065960dd59c7d (patch)
treefb8682e60d88b9d175b64153c0f4bb4205a3a6e6 /spec/lib/gitlab/bitbucket_import
parent402cc95c1a1df8168467f74e21c6df7d48359714 (diff)
downloadgitlab-ce-fc40c3f28a67ecafa58191c0cd6065960dd59c7d.tar.gz
Fix Rubocop errors with Bitbucket Importer spec
Diffstat (limited to 'spec/lib/gitlab/bitbucket_import')
-rw-r--r--spec/lib/gitlab/bitbucket_import/importer_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/lib/gitlab/bitbucket_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_import/importer_spec.rb
index 99a65f26f99..36893751ee0 100644
--- a/spec/lib/gitlab/bitbucket_import/importer_spec.rb
+++ b/spec/lib/gitlab/bitbucket_import/importer_spec.rb
@@ -67,14 +67,14 @@ describe Gitlab::BitbucketImport::Importer, lib: true do
:get,
"https://api.bitbucket.org/2.0/repositories/#{project_identifier}"
).to_return(status: 200,
- headers: {"Content-Type" => "application/json"},
+ headers: { "Content-Type" => "application/json" },
body: { has_issues: true, full_name: project_identifier }.to_json)
stub_request(
:get,
"https://api.bitbucket.org/2.0/repositories/#{project_identifier}/issues?pagelen=50&sort=created_on"
).to_return(status: 200,
- headers: {"Content-Type" => "application/json"},
+ headers: { "Content-Type" => "application/json" },
body: issues_statuses_sample_data.to_json)
sample_issues_statuses.each_with_index do |issue, index|
@@ -83,22 +83,22 @@ describe Gitlab::BitbucketImport::Importer, lib: true do
"https://api.bitbucket.org/2.0/repositories/#{project_identifier}/issues/#{issue[:id]}/comments?pagelen=50&sort=created_on"
).to_return(
status: 200,
- headers: {"Content-Type" => "application/json"},
+ headers: { "Content-Type" => "application/json" },
body: { author_info: { username: "username" }, utc_created_on: index }.to_json
)
end
stub_request(
- :get,
- "https://api.bitbucket.org/2.0/repositories/#{project_identifier}/pullrequests?pagelen=50&sort=created_on&state=ALL"
+ :get,
+ "https://api.bitbucket.org/2.0/repositories/#{project_identifier}/pullrequests?pagelen=50&sort=created_on&state=ALL"
).to_return(status: 200,
- headers: {"Content-Type" => "application/json"},
+ headers: { "Content-Type" => "application/json" },
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
+ Bitbucket::Representation::Issue.new
importer.execute
expect(project.issues.where(state: "closed").size).to eq(5)