Skip to content
Snippets Groups Projects
Verified Commit f5ecdb8f authored by Dave Long's avatar Dave Long
Browse files

Issue #3449891 by NexusNovaz, manish-31, bbrala: Move to new test path in NodeTest as per todo

(cherry picked from commit 11ce3c83)
parent 6e78beed
Branches
Tags
5 merge requests!122353526426-warning-for-missing,!11958Issue #3490507 by alexpott, smustgrave: Fix bogus mocking in...,!11769Issue #3517987: Add option to contextual filters to encode slashes in query parameter.,!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #193976 passed with warnings
Pipeline: drupal

#194000

    Pipeline: drupal

    #193997

      Pipeline: drupal

      #193987

        +1
        ......@@ -338,34 +338,17 @@ public function testGetIndividual() {
        // 403 when accessing own unpublished node.
        $response = $this->request('GET', $url, $request_options);
        // @todo Remove $expected + assertResourceResponse() in favor of the commented line below once https://www.drupal.org/project/drupal/issues/2943176 lands.
        $expected_document = [
        'jsonapi' => static::$jsonApiMember,
        'errors' => [
        [
        'title' => 'Forbidden',
        'status' => '403',
        'detail' => 'The current user is not allowed to GET the selected resource.',
        'links' => [
        'info' => ['href' => HttpExceptionNormalizer::getInfoUrl(403)],
        'via' => ['href' => $url->setAbsolute()->toString()],
        ],
        'source' => [
        'pointer' => '/data',
        ],
        ],
        ],
        ];
        $this->assertResourceResponse(
        $this->assertResourceErrorResponse(
        403,
        $expected_document,
        'The current user is not allowed to GET the selected resource.',
        $url,
        $response,
        '/data',
        ['4xx-response', 'http_response', 'node:1'],
        ['url.query_args:resourceVersion', 'url.site', 'user.permissions'],
        FALSE,
        'MISS'
        );
        /* $this->assertResourceErrorResponse(403, 'The current user is not allowed to GET the selected resource.', $response, '/data'); */
        // 200 after granting permission.
        $this->grantPermissionsToTestedRole(['view own unpublished content']);
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment