Procházet zdrojové kódy

Updating tests to work with new structure

Irakli Tchitadze před 2 roky
rodič
revize
3d3b343708

+ 9 - 2
tests/Fixtures/collection.json

@@ -340,6 +340,13 @@
     }
   ],
   "auth": {
-    "type": "bearer"
+    "type": "bearer",
+    "bearer": [
+      {
+        "key": "key",
+        "value": null,
+        "type": "string"
+      }
+    ]
   }
-}
+}

+ 12 - 1
tests/Unit/PostmanCollectionWriterTest.php

@@ -224,7 +224,18 @@ class PostmanCollectionWriterTest extends TestCase
         $config['auth']['in'] = 'bearer';
         $collection = $this->generate($config, [$endpoints]);
 
-        $this->assertEquals(['type' => 'bearer'], $collection['auth']);
+        $expected = [
+            'type'   => 'bearer',
+            'bearer' => [
+                [
+                    'key'   => null,
+                    'value' => null,
+                    'type'  => 'string',
+                ],
+            ],
+        ];
+
+        $this->assertEquals($expected, $collection['auth']);
         $this->assertArrayNotHasKey('auth', $collection['item'][0]['item'][0]['request']);
         $this->assertEquals(['type' => 'noauth'], $collection['item'][0]['item'][1]['request']['auth']);