File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,23 @@ public function testApi()
20
20
->assertStatus (Response::HTTP_OK );
21
21
}
22
22
23
+ public function testApiCanHideMetadata ()
24
+ {
25
+ Config::set ('request-docs.hide_meta_data ' , true );
26
+
27
+ $ response = $ this ->get (route ('request-docs.api ' ))
28
+ ->assertStatus (Response::HTTP_OK );
29
+
30
+ $ docs = collect ($ response ->json ());
31
+
32
+ $ this ->assertEmpty ($ docs ->pluck ('middlewares ' )->flatten ()->toArray ());
33
+ $ this ->assertSame (['' ], $ docs ->pluck ('controller ' )->flatten ()->unique ()->toArray ());
34
+ $ this ->assertSame (['' ], $ docs ->pluck ('controller_full_path ' )->flatten ()->unique ()->toArray ());
35
+ $ this ->assertSame (['' ], $ docs ->pluck ('method ' )->flatten ()->unique ()->toArray ());
36
+ $ this ->assertSame (['' ], $ docs ->pluck ('doc_block ' )->flatten ()->unique ()->toArray ());
37
+ $ this ->assertEmpty ($ docs ->pluck ('rules ' )->flatten ()->toArray ());
38
+ }
39
+
23
40
public function testAbleFetchAllMethods ()
24
41
{
25
42
$ response = $ this ->get (route ('request-docs.api ' ))
You can’t perform that action at this time.
0 commit comments