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
9c498b10
Commit
9c498b10
authored
Feb 27, 2019
by
Diana Stanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move check for nil due_on into build section of spec
parent
46da2764
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb
...gitlab/github_import/importer/milestones_importer_spec.rb
+5
-8
No files found.
spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb
View file @
9c498b10
...
...
@@ -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
)
...
...
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