@@ -6,7 +6,7 @@ var expect = require('chai').expect
6
6
var JSONAPIComponent = require ( '../' )
7
7
var app , Post , Archive
8
8
9
- describe . only ( 'loopback json api remote methods' , function ( ) {
9
+ describe ( 'loopback json api remote methods' , function ( ) {
10
10
var autocompleteTitleData = [ 'Post 1' , 'Post 2' ]
11
11
12
12
var archiveData = {
@@ -129,6 +129,33 @@ describe.only('loopback json api remote methods', function () {
129
129
testLastJsonAPI ( )
130
130
} )
131
131
132
+ describe ( 'when `exclude` is set' , function ( done ) {
133
+ beforeEach ( function ( ) {
134
+ JSONAPIComponent ( app , {
135
+ handleCustomRemote : true ,
136
+ exclude : [ { methods : [ 'last' , 'autocomplete' , 'archives' ] } ] ,
137
+ include : [ { methods : 'last' } ]
138
+ } )
139
+ } )
140
+
141
+ testArchivesJsonAPI ( )
142
+ testAutocompleteJsonAPI ( )
143
+ testLastRaw ( )
144
+ } )
145
+
146
+ describe ( 'when `include` is set' , function ( done ) {
147
+ beforeEach ( function ( ) {
148
+ JSONAPIComponent ( app , {
149
+ handleCustomRemote : false ,
150
+ include : [ { methods : 'last' } ]
151
+ } )
152
+ } )
153
+
154
+ testArchivesJsonAPI ( )
155
+ testAutocompleteJsonAPI ( )
156
+ testLastJsonAPI ( )
157
+ } )
158
+
132
159
/* Static test */
133
160
function testAutocompleteJsonAPI ( ) {
134
161
it (
0 commit comments