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 2
2
import { HttpService } from '../http.service' ;
3
3
4
4
describe ( 'HTTP Service' , ( ) => {
5
+
5
6
it ( 'can make GET http call' , async ( ) => {
6
7
const payload = { } ;
7
8
const restApiCall = await HttpService . buildRestApiCall (
@@ -16,6 +17,7 @@ describe('HTTP Service', () => {
16
17
} ) ;
17
18
} ) ;
18
19
} ) ;
20
+
19
21
it ( 'can handle errors' , async ( ) => {
20
22
const payload = 'asdasd' ;
21
23
const restApiCall = await HttpService . buildRestApiCall (
@@ -30,4 +32,18 @@ describe('HTTP Service', () => {
30
32
} ) ;
31
33
} ) ;
32
34
} ) ;
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
+
33
49
} ) ;
You can’t perform that action at this time.
0 commit comments