summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
diff options
context:
space:
mode:
authorDiana Stanley <dstanley@gitlab.com>2019-02-27 11:39:27 -0800
committerDiana Stanley <dstanley@gitlab.com>2019-02-27 11:39:27 -0800
commit9c498b10ee07388d36df468d9286631ff98c00b1 (patch)
treeee73fe1b61e26d1428fb3ba4a83f331ed6d15b87 /spec/lib/gitlab
parent46da2764ce37dc0fb43b86460fd98a5af330c434 (diff)
downloadgitlab-ce-9c498b10ee07388d36df468d9286631ff98c00b1.tar.gz
Move check for nil due_on into build section of spec
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb b/spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb
index 35c37f9499d..120a07ff2b3 100644
--- a/spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb
@@ -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)