Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Class Project
Kape
Commits
3218aab3
Commit
3218aab3
authored
Dec 06, 2019
by
emil farisan
Browse files
added storage import
parent
ebcd00ef
Pipeline
#26736
failed with stages
in 5 minutes and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
assets/js/__test__/EditProfile-test.jsx
View file @
3218aab3
...
...
@@ -2,6 +2,7 @@ import React from 'react';
import
ReactTestUtils
from
'
react-dom/test-utils
'
;
import
fetchMock
from
'
fetch-mock
'
;
import
EditProfil
from
'
../EditProfile
'
;
import
Storage
from
'
../lib/Storage
'
;
import
{
studentSession
,
response
,
response2
}
from
'
../object/Response
'
;
describe
(
'
EditProfil
'
,
()
=>
{
...
...
@@ -56,7 +57,7 @@ describe('EditProfil', () => {
<
EditProfil
route
=
{
{
own
:
true
,
data
:
studentSession
}
}
user
=
{
{
data
:
studentSession
}
}
params
=
{
{
id
:
3
}
}
/>);
profile
.
getProfile
().
then
(()
=>
expect
(
profile
.
props
.
route
.
own
).
to
.
equal
(
true
));
const
userData
=
Storage
.
get
(
'
u
ser
-d
ata
'
);
const
userData
=
Storage
.
get
U
ser
D
ata
(
);
expect
(
response2
).
to
.
equal
(
userData
.
student
);
fetchMock
.
restore
();
});
...
...
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