Commit 9c498b10 authored by Diana Stanley's avatar Diana Stanley

Move check for nil due_on into build section of spec

parent 46da2764
......@@ -87,6 +87,7 @@ describe Gitlab::GithubImport::Importer::MilestonesImporter, :clean_gitlab_redis
describe '#build' do
let(:milestone_hash) { importer.build(milestone) }
let(:milestone_hash2) { importer.build(milestone2) }
it 'returns the attributes of the milestone as a Hash' do
expect(milestone_hash).to be_an_instance_of(Hash)
......@@ -117,6 +118,10 @@ describe Gitlab::GithubImport::Importer::MilestonesImporter, :clean_gitlab_redis
expect(milestone_hash[:due_date]).to eq(due_on.to_date)
end
it 'responds correctly to no due date value' do
expect(milestone_hash2[:due_date]).to be nil
end
it 'includes the created timestamp' do
expect(milestone_hash[:created_at]).to eq(created_at)
end
......@@ -127,14 +132,6 @@ 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