Commit 00223f91 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'add-release-to-github-importer' into 'master'

Add a field for released_at to GH importer

See merge request gitlab-org/gitlab-ce!31496
parents 136c3efe 2b304239
---
title: Add a field for released_at to GH importer
merge_request: 31496
author:
type: fixed
......@@ -36,6 +36,7 @@ module Gitlab
description: description_for(release),
created_at: release.created_at,
updated_at: release.updated_at,
released_at: release.published_at,
project_id: project.id
}
end
......
......@@ -6,6 +6,7 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
let(:importer) { described_class.new(project, client) }
let(:created_at) { Time.new(2017, 1, 1, 12, 00) }
let(:updated_at) { Time.new(2017, 1, 1, 12, 15) }
let(:released_at) { Time.new(2017, 1, 1, 12, 00) }
let(:release) do
double(
......@@ -13,7 +14,8 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
tag_name: '1.0',
body: 'This is my release',
created_at: created_at,
updated_at: updated_at
updated_at: updated_at,
published_at: released_at
)
end
......@@ -23,7 +25,8 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
tag_name: '1.0',
description: 'This is my release',
created_at: created_at,
updated_at: updated_at
updated_at: updated_at,
released_at: released_at
}
expect(importer).to receive(:build_releases).and_return([release_hash])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment