File tree 2 files changed +5
-1
lines changed 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 62
62
*
63
63
* NOTE: This feature does not work if the "resource name" is not set.
64
64
*/
65
- 'enabled ' => true ,
65
+ 'enabled ' => false ,
66
66
67
67
/*
68
68
* The name of key in the request, where we should look for the fieldsets to parse.
Original file line number Diff line number Diff line change 3
3
use Illuminate \Testing \Fluent \AssertableJson ;
4
4
5
5
it ('returns only requested fields ' , function ($ fields , $ expectedMissing ) {
6
+ config ()->set ('fractal.auto_fieldsets.enabled ' , true );
6
7
$ response = $ this ->call ('GET ' , '/auto-fieldsets-with-resource-name ' , [
7
8
'fields ' => [
8
9
'books ' => $ fields ,
27
28
]);
28
29
29
30
it ('doesnt work if "resource name" is not set ' , function ($ fields ) {
31
+ config ()->set ('fractal.auto_fieldsets.enabled ' , true );
30
32
$ response = $ this ->call ('GET ' , '/auto-fieldsets-without-resource-name ' , [
31
33
'fields ' => [
32
34
'books ' => $ fields ,
50
52
]);
51
53
52
54
it ('all fields are present when parameter is not passed ' , function () {
55
+ config ()->set ('fractal.auto_fieldsets.enabled ' , true );
53
56
$ response = $ this ->call ('GET ' , '/auto-fieldsets-with-resource-name ' , [
54
57
'include ' => 'characters ' ,
55
58
]);
86
89
});
87
90
88
91
it ('uses the configured request key ' , function () {
92
+ config ()->set ('fractal.auto_fieldsets.enabled ' , true );
89
93
config ()->set ('fractal.auto_fieldsets.request_key ' , 'other_fields ' );
90
94
$ response = $ this ->call ('GET ' , '/auto-fieldsets-with-resource-name ' , [
91
95
'fields ' => [
You can’t perform that action at this time.
0 commit comments