You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: libraryelements_permissions_test.go
    path of file: ./repos/grafana/pkg/services/libraryelements
    
    the code of the file until where you have to start completion: package libraryelements

import (
	"encoding/json"
	"fmt"
	"net/http"
	"testing"

	"github.com/google/go-cmp/cmp"
	"github.com/stretchr/testify/require"

	"github.com/grafana/grafana/pkg/services/dashboards"
	"github.com/grafana/grafana/pkg/services/libraryelements/model"
	"github.com/grafana/grafana/pkg/services/org"
	"github.com/grafana/grafana/pkg/web"
)

func TestLibraryElementPermissionsGeneralFolder(t *testing.T) {
	var gene
    
func TestLibraryElementDeletePermissions(t *testing.T) {
	var accessCases = []struct {
		permissions map[string][]string
		desc        string
		status      int
	}{
		{
			desc: "can delete library elements when granted write access to the correct folder",
			permissions: map[string][]string{
				dashboards.ActionFoldersWrite: {dashboards.ScopeFoldersProvider.GetResourceScopeUID("Folder")},
			},
			status: http.StatusOK,
		},
		{
			desc: "can delete library elements when granted write access to all folders",
			permissions: map[string][]string{
				dashboards.ActionFoldersWrite: {dashboards.ScopeFoldersProvider.GetResourceAllScope()},
			},
			status: http.StatusOK,
		},
		{
			desc: "can't delete library elements when granted write access to the wrong folder",
			permissions: map[string][]string{
				dashboards.ActionFoldersWrite: {dashboards.ScopeFoldersProvider.GetResourceScopeUID("Other_folder")},
			},
			status: http.StatusForbidden,
		},
		{
			desc: "can't delete library elements when granted read access to the right folder",
			permissions: map[string][]string{
				dashboards.ActionFoldersRead: {dashboards.ScopeFoldersProvider.GetResourceScopeUID("Folder")},
			},
			status: http.StatusForbidden,
		},
	}

	for _, testCase := range accessCases {
		testScenario(t, testCase.desc,
			func(t *testing.T, sc scenarioContext) {
				folder := createFolder(t, sc, "Folder")
				// nolint:staticcheck
				command := getCreatePanelCommand(folder.ID, "Library Panel Name")
				sc.reqContext.Req.Body = mockRequestBody(command)
				resp := sc.service.createHandler(sc.reqContext)
				result := validateAndUnMarshalResponse(t, resp)

				sc.reqContext.SignedInUser.Permissions = map[int64]map[string][]string{
					1: testCase.permissions,
				}

				sc.ctx.Req = web.SetURLParams(sc.ctx.Req, map[string]string{":uid": result.Result.UID})
				resp = sc.service.deleteHandler(sc.reqContext)
				require.Equal(t, testCase.status, resp.Status())
			})
	}
}