ccache/item_test.go

14 lines
268 B
Go
Raw Normal View History

2013-10-19 14:36:33 +02:00
package ccache
import (
"github.com/karlseguin/gspec"
"testing"
2013-10-19 14:36:33 +02:00
)
func TestItemPromotability(t *testing.T) {
spec := gspec.New(t)
item := &Item{promotions: 4}
spec.Expect(item.shouldPromote(5)).ToEqual(true)
spec.Expect(item.shouldPromote(5)).ToEqual(false)
2013-10-19 14:36:33 +02:00
}