Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
46da2764
Commit
46da2764
authored
Feb 26, 2019
by
Diana Stanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for nil due_on value during import
parent
63b89f04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb
...gitlab/github_import/importer/milestones_importer_spec.rb
+21
-0
No files found.
spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb
View file @
46da2764
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment