File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
integration/api/com_privacy Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1+ describe ( 'Test privacy consent API endpoint' , ( ) => {
2+ afterEach ( ( ) => cy . task ( 'queryDB' , 'DELETE FROM #__privacy_consents' ) ) ;
3+
4+ it ( 'can get a list of consents' , ( ) => {
5+ cy . db_createPrivacyConsent ( { body : 'test body' } )
6+ . then ( ( ) => cy . api_get ( '/privacy/consents' ) )
7+ . then ( ( response ) => cy . api_responseContains ( response , 'body' , 'test body' ) ) ;
8+ } ) ;
9+
10+ it ( 'can list a single consent' , ( ) => {
11+ cy . db_createPrivacyConsent ( { body : 'test body' } )
12+ . then ( ( id ) => cy . api_get ( `/privacy/consents/${ id } ` ) )
13+ . then ( ( response ) => cy . wrap ( response ) . its ( 'body' ) . its ( 'data' ) . its ( 'attributes' )
14+ . its ( 'body' )
15+ . should ( 'contain' , 'test body' ) ) ;
16+ } ) ;
17+ } ) ;
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ function createInsertQuery(table, values) {
4848 * The privacy consent contains some default values when not all required fields are passed in the given data.
4949 * The id of the inserted privacy consent is returned
5050 *
51- * @param {Object } privacyRequest The consent data to insert
51+ * @param {Object } privacyConsent The consent data to insert
5252 *
5353 * @returns integer
5454 */
You can’t perform that action at this time.
0 commit comments