Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xpub-faraday
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
xpub
xpub-faraday
Commits
acb46ddd
Commit
acb46ddd
authored
6 years ago
by
Sebastian Mihalache
Browse files
Options
Downloads
Patches
Plain Diff
tests(helper-service): add test for collection without handling editor
parent
243fac44
No related branches found
No related tags found
3 merge requests
!160
Update staging with master features
,
!156
Develop
,
!148
Hin 1098
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/component-helper-service/src/tests/fragment.test.js
+17
-0
17 additions, 0 deletions
packages/component-helper-service/src/tests/fragment.test.js
with
17 additions
and
0 deletions
packages/component-helper-service/src/tests/fragment.test.js
+
17
−
0
View file @
acb46ddd
...
@@ -253,5 +253,22 @@ describe('Fragment helper', () => {
...
@@ -253,5 +253,22 @@ describe('Fragment helper', () => {
expect
(
fragmentUsers
.
length
).
toBeGreaterThan
(
0
)
expect
(
fragmentUsers
.
length
).
toBeGreaterThan
(
0
)
expect
(
fragmentUsers
).
toHaveLength
(
fragment
.
recommendations
.
length
)
expect
(
fragmentUsers
).
toHaveLength
(
fragment
.
recommendations
.
length
)
})
})
it
(
'
should return an error when the collection does not have a handling editor
'
,
async
()
=>
{
const
{
collection
}
=
testFixtures
.
collections
const
{
fragment
}
=
testFixtures
.
fragments
const
fragmentHelper
=
new
Fragment
({
fragment
})
delete
collection
.
handlingEditor
try
{
await
fragmentHelper
.
getReviewersAndEditorsData
({
collection
,
UserModel
:
models
.
User
,
})
}
catch
(
e
)
{
expect
(
e
.
message
).
toEqual
(
`Collection
${
collection
.
id
}
does not have a Handling Editor`
,
)
}
})
})
})
})
})
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment