2
0

Achieve 100% test coverage

This commit is contained in:
Jack Christensen
2018-12-26 17:17:08 -06:00
parent 75889e9497
commit 383709a0b4
3 changed files with 32 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
package puddle
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestRemoveResourcePanicsWithBugReportIfResourceDoesNotExist(t *testing.T) {
s := []*Resource{new(Resource), new(Resource), new(Resource)}
assert.PanicsWithValue(t, "BUG: removeResource could not find res in slice", func() { removeResource(s, new(Resource)) })
}