Skip to content

Commit e1fa273

Browse files
committed
updated har tests
1 parent ac5c1da commit e1fa273

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

test/codegen/har_codegen_test.dart

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@ void main() {
5050
test('GET 3', () {
5151
const expectedCode = r"""{
5252
"method": "GET",
53-
"url": "https://api.apidash.dev/country/data?code=IND",
53+
"url": "https://api.apidash.dev/country/data?code=US&code=IND",
5454
"httpVersion": "HTTP/1.1",
5555
"queryString": [
56+
{
57+
"name": "code",
58+
"value": "US"
59+
},
5660
{
5761
"name": "code",
5862
"value": "IND"
@@ -668,6 +672,10 @@ void main() {
668672
{
669673
"name": "Content-Type",
670674
"value": "application/json"
675+
},
676+
{
677+
"name": "x-api-key",
678+
"value": "reqres-free-v1"
671679
}
672680
],
673681
"postData": {
@@ -696,6 +704,10 @@ void main() {
696704
{
697705
"name": "Content-Type",
698706
"value": "application/json"
707+
},
708+
{
709+
"name": "x-api-key",
710+
"value": "reqres-free-v1"
699711
}
700712
],
701713
"postData": {
@@ -720,7 +732,12 @@ void main() {
720732
"url": "https://reqres.in/api/users/2",
721733
"httpVersion": "HTTP/1.1",
722734
"queryString": [],
723-
"headers": []
735+
"headers": [
736+
{
737+
"name": "x-api-key",
738+
"value": "reqres-free-v1"
739+
}
740+
]
724741
}""";
725742
expect(
726743
codeGen.getCode(
@@ -741,6 +758,10 @@ void main() {
741758
{
742759
"name": "Content-Type",
743760
"value": "application/json"
761+
},
762+
{
763+
"name": "x-api-key",
764+
"value": "reqres-free-v1"
744765
}
745766
],
746767
"postData": {

0 commit comments

Comments
 (0)