File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/client/shared/services/core/__tests__ Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 22import { HttpService } from '../http.service' ;
33
44describe ( 'HTTP Service' , ( ) => {
5+
56 it ( 'can make GET http call' , async ( ) => {
67 const payload = { } ;
78 const restApiCall = await HttpService . buildRestApiCall (
@@ -16,6 +17,7 @@ describe('HTTP Service', () => {
1617 } ) ;
1718 } ) ;
1819 } ) ;
20+
1921 it ( 'can handle errors' , async ( ) => {
2022 const payload = 'asdasd' ;
2123 const restApiCall = await HttpService . buildRestApiCall (
@@ -30,4 +32,18 @@ describe('HTTP Service', () => {
3032 } ) ;
3133 } ) ;
3234 } ) ;
35+
36+
37+ it ( 'can set Cookie' , ( ) => {
38+ const restApiCall = HttpService . setCookie (
39+ 'apiasdasd' , 'GET' , { }
40+ ) ;
41+ expect ( restApiCall ) . toBe ( undefined ) ;
42+ } ) ;
43+
44+ it ( 'can get RefreshToken' , ( ) => {
45+ const getRefreshToken = HttpService . getRefreshToken ( ) ;
46+ expect ( getRefreshToken ) . toBe ( 'Refresh API call failed' ) ;
47+ } ) ;
48+
3349} ) ;
You can’t perform that action at this time.
0 commit comments