text: //
  // SPDX-FileCopyrightText: 2021 SAP SE or an SAP affiliate company and Gardener contributors
  //
  // SPDX-License-Identifier: Apache-2.0
  //
  
  'use strict'
  
  const { mockRequest } = require('@gardener-dashboard/request')
  
  describe('api', function () {
    let agent
  
    beforeAll(() => {
      agent = createAgent()
    })
  
    afterAll(() => {
      return agent.close()
    })
  
    beforeEach(() => {
      mockRequest.mockReset()
    })
  
    describe('seeds', function () {
      const user = fixtures.auth.createUser({ id: 'john.doe@example.org' })
  
      it('should return all seeds', async function () {
        mockRequest.mockImplementationOnce(fixtures.auth.mocks.reviewSelfSubjectAccess())
  
        const res = await agent
          .get('/api/seeds')
          .set('cookie', await user.cookie)
          .expect('content-type', /json/)
          .expect(200)
  
        expect(mockRequest).toBeCalledTimes(1)
        expect(mockRequest.mock.calls).toMatchSnapshot()
  
        expect(res.body).toMatchSnapshot()
      })
    })
  })
  