Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
2a084f63
Commit
2a084f63
authored
4 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
update test unit
parent
6447e044
master
MLAB-677
devel
reset-jul13
reset-merge
testing
5 merge requests
!143
updating yml config
,
!91
Prepare prod
,
!90
Testing
,
!89
Testing
,
!79
Mlab 383
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
__tests__/gitlab.unit.test.js
+2
-2
__tests__/gitlab.unit.test.js
__tests__/method.unit.test.js
+1
-1
__tests__/method.unit.test.js
with
3 additions
and
3 deletions
+3
-3
__tests__/gitlab.unit.test.js
+
2
-
2
View file @
2a084f63
...
...
@@ -4,7 +4,7 @@ const gitlab = require('../routes/gitlab')
describe
(
'
GitLab API
'
,
()
=>
{
test
(
'
returns an existing gitlab user by an email address
'
,
async
()
=>
{
let
user
=
await
gitlab
.
getUserByEmail
(
'
putavaliduseremailaddress@here
.com
'
)
let
user
=
await
gitlab
.
getUserByEmail
(
'
litehon958@whipjoy
.com
'
)
expect
(
user
).
not
.
toBeNull
()
})
test
(
'
returns an undefined user
'
,
async
()
=>
{
...
...
@@ -13,7 +13,7 @@ describe('GitLab API', () => {
})
test
(
'
returns users project
'
,
async
()
=>
{
let
userProjects
=
await
gitlab
.
getUserProjects
(
'
put a valid user id in integer here
'
)
let
userProjects
=
await
gitlab
.
getUserProjects
(
136
)
expect
(
userProjects
).
toBeDefined
()
})
test
(
'
returns undefined projects, due to non-existing gitlab user ID
'
,
async
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
__tests__/method.unit.test.js
+
1
-
1
View file @
2a084f63
...
...
@@ -3,7 +3,7 @@ const methods = require('../routes/methods')
describe
(
"
DB methohds test
"
,
()
=>
{
it
(
'
returns a user from DB by email
'
,
done
=>
{
methods
.
getUserByEmail
(
'
rosanny.sihombing@hft-stuttgart.de
'
,
function
(
resp
,
err
){
methods
.
getUserByEmail
(
'
litehon958@whipjoy.com
'
,
function
(
resp
,
err
){
try
{
expect
(
resp
).
not
.
toBeNull
()
expect
(
err
).
toBeNull
()
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets