File tree Expand file tree Collapse file tree 3 files changed +17
-12
lines changed
templates/flutter/lib/src Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
101
101
@override
102
102
Future<String > ping() async {
103
103
final String apiPath = '/ping';
104
- final response = await call(HttpMethod.get, responseType: ResponseType.plain);
104
+ final response = await call(HttpMethod.get, path: apiPath, responseType: ResponseType.plain);
105
105
106
106
return response.data;
107
107
}
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ class ClientIO extends ClientBase with ClientMixin {
133
133
@override
134
134
Future<String > ping() async {
135
135
final String apiPath = '/ping';
136
- final response = await call(HttpMethod.get, responseType: ResponseType.plain);
136
+ final response = await call(HttpMethod.get, path: apiPath, responseType: ResponseType.plain);
137
137
138
138
return response.data;
139
139
}
Original file line number Diff line number Diff line change @@ -25,27 +25,32 @@ void main() async {
25
25
.addHeader ("Origin" , "http://localhost" )
26
26
.setSelfSigned ();
27
27
28
- final ping = await client. ping ( );
29
- final pingResponse = parse (ping) ! ;
30
- print (pingResponse );
28
+ Foo foo = Foo (client );
29
+ Bar bar = Bar (client) ;
30
+ General general = General (client );
31
31
32
- // reset configs
32
+ client. setSelfSigned ();
33
33
client.setProject ('console' );
34
34
client.setEndPointRealtime (
35
35
"wss://cloud.appwrite.io/v1" );
36
36
37
- Foo foo = Foo (client);
38
- Bar bar = Bar (client);
39
- General general = General (client);
40
-
41
37
Realtime realtime = Realtime (client);
42
- final rtsub = realtime.subscribe (["tests" ]);
38
+ final rtsub = realtime.subscribe (["tests" ]);
43
39
44
40
await Future .delayed (Duration (seconds: 5 ));
45
41
client.addHeader ('Origin' , 'http://localhost' );
46
- // Foo Tests
47
42
print ('\n Test Started' );
48
43
44
+ // Ping pong tests
45
+ client.setProject ('123456' );
46
+ final ping = await client.ping ();
47
+ final pingResponse = parse (ping)! ;
48
+ print (pingResponse);
49
+
50
+ // reset project.
51
+ client.setProject ('console' );
52
+
53
+ // Foo Tests
49
54
Mock response;
50
55
response = await foo.get (x: 'string' , y: 123 , z: ['string in array' ]);
51
56
print (response.result);
You can’t perform that action at this time.
0 commit comments