Updated mock_request test cases

This commit is contained in:
thomashii 2021-06-23 21:06:57 +08:00
parent 92b3f0b74f
commit 32db2c2b46
2 changed files with 9 additions and 12 deletions

View file

@ -7,6 +7,7 @@ environment:
dependencies:
charcode: ^1.2.0
dev_dependencies:
#angel_framework: ^2.1.0
angel3_framework: ^4.0.0
http: ^0.13.2
test: ^1.17.4
pedantic: ^1.11.0

View file

@ -1,27 +1,24 @@
//import 'dart:convert';
//import 'dart:io';
//import 'package:angel_framework/angel_framework.dart';
//import 'package:angel_framework/http.dart';
//import 'package:mock_request/mock_request.dart';
//import 'package:test/test.dart';
import 'dart:convert';
import 'dart:io';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_mock_request/angel3_mock_request.dart';
import 'package:test/test.dart';
void main() {
/*
var uri = Uri.parse('http://localhost:3000');
var app = Angel()
..get('/foo', (req, res) => 'Hello, world!')
..post('/body',
(req, res) => req.parseBody().then((_) => req.bodyAsMap.length))
..get('/session', (req, res) async {
req.session['foo'] = 'bar';
req.session?['foo'] = 'bar';
})
..get('/conn', (RequestContext req, res) {
return res.serialize(req.ip == InternetAddress.loopbackIPv4.address);
});
var http = AngelHttp(app);
test('receive a response', () async {
@ -67,5 +64,4 @@ void main() {
expect(rq.uri.path, '/mock');
expect(rq.requestedUri.toString(), 'http://example.com/mock');
});
*/
}