loading up the forgejo repo on tangled to test page performance
at forgejo 317 B view raw
1// Copyright 2024 The Forgejo Authors 2// SPDX-License-Identifier: MIT 3 4package test 5 6import ( 7 "testing" 8 9 "github.com/stretchr/testify/assert" 10) 11 12func TestMockProtect(t *testing.T) { 13 mockable := "original" 14 restore := MockProtect(&mockable) 15 mockable = "tainted" 16 restore() 17 assert.Equal(t, "original", mockable) 18}