@@ -44,18 +44,18 @@ describe('actions', () => {
44
44
first : {
45
45
limit : '20' ,
46
46
rel : 'first' ,
47
- url : 'http: //api.xsnippet.org/snippets?limit=20' ,
47
+ url : '//api.xsnippet.org/snippets?limit=20' ,
48
48
} ,
49
49
next : {
50
50
limit : '20' ,
51
51
marker : 28 ,
52
52
rel : 'next' ,
53
- url : 'http: //api.xsnippet.org/snippets?limit=20&marker=28' ,
53
+ url : '//api.xsnippet.org/snippets?limit=20&marker=28' ,
54
54
} ,
55
55
prev : {
56
56
limit : '20' ,
57
57
rel : 'prev' ,
58
- url : 'http: //api.xsnippet.org/snippets?limit=20' ,
58
+ url : '//api.xsnippet.org/snippets?limit=20' ,
59
59
} ,
60
60
} ;
61
61
const store = createStore ( ) ;
@@ -82,10 +82,10 @@ describe('actions', () => {
82
82
syntax : 'Python' ,
83
83
} ,
84
84
] ;
85
- const links = '<http: //api.xsnippet.org/snippets?limit=20>; rel="first", <http: //api.xsnippet.org/snippets?limit=20&marker=19>; rel="next", <http: //api.xsnippet.org/snippets?limit=20&marker=59>; rel="prev"' ;
85
+ const links = '<//api.xsnippet.org/snippets?limit=20>; rel="first", <//api.xsnippet.org/snippets?limit=20&marker=19>; rel="next", <//api.xsnippet.org/snippets?limit=20&marker=59>; rel="prev"' ;
86
86
87
87
fetchMock . getOnce (
88
- 'http: //api.xsnippet.org/snippets?limit=20&marker=39' ,
88
+ '//api.xsnippet.org/snippets?limit=20&marker=39' ,
89
89
{
90
90
headers : { Link : links } ,
91
91
body : snippets ,
@@ -114,19 +114,19 @@ describe('actions', () => {
114
114
first : {
115
115
limit : '20' ,
116
116
rel : 'first' ,
117
- url : 'http: //api.xsnippet.org/snippets?limit=20' ,
117
+ url : '//api.xsnippet.org/snippets?limit=20' ,
118
118
} ,
119
119
next : {
120
120
limit : '20' ,
121
121
marker : '19' ,
122
122
rel : 'next' ,
123
- url : 'http: //api.xsnippet.org/snippets?limit=20&marker=19' ,
123
+ url : '//api.xsnippet.org/snippets?limit=20&marker=19' ,
124
124
} ,
125
125
prev : {
126
126
limit : '20' ,
127
127
marker : '59' ,
128
128
rel : 'prev' ,
129
- url : 'http: //api.xsnippet.org/snippets?limit=20&marker=59' ,
129
+ url : '//api.xsnippet.org/snippets?limit=20&marker=59' ,
130
130
} ,
131
131
} ,
132
132
} ) ;
@@ -145,10 +145,10 @@ describe('actions', () => {
145
145
syntax : 'Python' ,
146
146
} ,
147
147
] ;
148
- const links = '<http: //api.xsnippet.org/snippets?limit=20>; rel="first", <http: //api.xsnippet.org/snippets?limit=20&marker=39>; rel="next"' ;
148
+ const links = '<//api.xsnippet.org/snippets?limit=20>; rel="first", <//api.xsnippet.org/snippets?limit=20&marker=39>; rel="next"' ;
149
149
150
150
fetchMock . getOnce (
151
- 'http: //api.xsnippet.org/snippets?limit=20' ,
151
+ '//api.xsnippet.org/snippets?limit=20' ,
152
152
{
153
153
headers : { Link : links } ,
154
154
body : snippets ,
@@ -177,13 +177,13 @@ describe('actions', () => {
177
177
first : {
178
178
limit : '20' ,
179
179
rel : 'first' ,
180
- url : 'http: //api.xsnippet.org/snippets?limit=20' ,
180
+ url : '//api.xsnippet.org/snippets?limit=20' ,
181
181
} ,
182
182
next : {
183
183
limit : '20' ,
184
184
marker : '39' ,
185
185
rel : 'next' ,
186
- url : 'http: //api.xsnippet.org/snippets?limit=20&marker=39' ,
186
+ url : '//api.xsnippet.org/snippets?limit=20&marker=39' ,
187
187
} ,
188
188
} ,
189
189
} ) ;
@@ -219,7 +219,7 @@ describe('actions', () => {
219
219
syntax : 'Go' ,
220
220
} ;
221
221
222
- fetchMock . getOnce ( `http: //api.xsnippet.org/snippets/${ snippet . id } ` , JSON . stringify ( snippet ) ) ;
222
+ fetchMock . getOnce ( `//api.xsnippet.org/snippets/${ snippet . id } ` , JSON . stringify ( snippet ) ) ;
223
223
224
224
const store = createStore ( ) ;
225
225
await store . dispatch ( actions . fetchSnippet ( snippet . id ) ) ;
@@ -254,7 +254,7 @@ describe('actions', () => {
254
254
it ( 'should create an action to fetch syntaxes' , async ( ) => {
255
255
const syntaxes = [ 'JavaScript' , 'Python' , 'Java' , 'Go' , 'Plain Text' ] ;
256
256
257
- fetchMock . getOnce ( 'http: //api.xsnippet.org/syntaxes' , JSON . stringify ( syntaxes ) ) ;
257
+ fetchMock . getOnce ( '//api.xsnippet.org/syntaxes' , JSON . stringify ( syntaxes ) ) ;
258
258
259
259
const store = createStore ( ) ;
260
260
await store . dispatch ( actions . fetchSyntaxes ) ;
@@ -274,7 +274,7 @@ describe('actions', () => {
274
274
syntax : 'JavaScript' ,
275
275
} ;
276
276
277
- fetchMock . postOnce ( 'http: //api.xsnippet.org/snippets' , JSON . stringify ( snippet ) ) ;
277
+ fetchMock . postOnce ( '//api.xsnippet.org/snippets' , JSON . stringify ( snippet ) ) ;
278
278
279
279
const store = createStore ( ) ;
280
280
await store . dispatch ( actions . postSnippet ( snippet , ( ) => { } ) ) ;
0 commit comments