Commit 46da2764 authored by Diana Stanley's avatar Diana Stanley

Add test for nil due_on value during import

parent 63b89f04
......@@ -21,6 +21,19 @@ describe Gitlab::GithubImport::Importer::MilestonesImporter, :clean_gitlab_redis
)
end
let(:milestone2) do
double(
:milestone,
number: 1,
title: '1.0',
description: 'The first release',
state: 'open',
due_on: nil,
created_at: created_at,
updated_at: updated_at
)
end
describe '#execute' do
it 'imports the milestones in bulk' do
milestone_hash = { number: 1, title: '1.0' }
......@@ -114,6 +127,14 @@ describe Gitlab::GithubImport::Importer::MilestonesImporter, :clean_gitlab_redis
end
end
describe '#nil_due_on' do
let(:milestone_hash) { importer.build(milestone2) }
it 'should handle missing due_on correctly' do
expect(milestone_hash[:due_date]).to be nil
end
end
describe '#each_milestone' do
it 'returns the milestones' do
expect(client)
......
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