Skip to content

Commit b0ddb97

Browse files
committed
Update tests
1 parent a48f14e commit b0ddb97

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

resources/views/partials/example-requests/bash.blade.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
```bash
22
curl -X {{$route['methods'][0]}} \
3-
{{$route['methods'][0] == 'GET' ? '-G ' : ''}}"{{ rtrim($baseUrl, '/')}}/{{ ltrim($route['boundUri'], '/') }}@if(count($route['cleanQueryParameters']))?{!! \Mpociot\ApiDoc\Tools\Utils::printQueryParamsAsString($route['cleanQueryParameters']) !!}
4-
@endif" @if(count($route['headers']))\
3+
{{$route['methods'][0] == 'GET' ? '-G ' : ''}}"{{ rtrim($baseUrl, '/')}}/{{ ltrim($route['boundUri'], '/') }}@if(count($route['cleanQueryParameters']))?{!! \Mpociot\ApiDoc\Tools\Utils::printQueryParamsAsString($route['cleanQueryParameters']) !!}@endif" @if(count($route['headers']))\
54
@foreach($route['headers'] as $header => $value)
65
-H "{{$header}}: {{ addslashes($value) }}"@if(! ($loop->last) || ($loop->last && count($route['bodyParameters']))) \
76
@endif

src/Tools/Utils.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public static function dumpException(\Exception $e)
9090

9191
public static function deleteDirectoryAndContents($dir)
9292
{
93+
$dir = ltrim($dir, "/");
9394
$adapter = new Local(realpath(__DIR__ . '/../../'));
9495
$fs = new Filesystem($adapter);
9596
$fs->deleteDir($dir);

tests/Fixtures/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ let params = {
233233
"user_id": "me",
234234
"page": "4",
235235
"filters": "consequatur",
236-
"url_encoded": "+ []&=",
236+
"url_encoded": "+ []&=",
237237
};
238238
Object.keys(params)
239239
.forEach(key => url.searchParams.append(key, params[key]));

0 commit comments

Comments
 (0)