fork/gdu
git clone https://git.julia.blue/fork/gdu
d062e88
master
1package fs 2 3import ( 4"testing" 5 6"github.com/stretchr/testify/assert" 7) 8 9func TestJSONAttributesIncludes (t * testing.T ) { 10t .Run ("nil set includes every attribute" ,func (t * testing.T ) { 11var attributes JSONAttributes 12assert .True (t ,attributes .Includes ("asize" )) 13assert .True (t ,attributes .Includes ("anything" )) 14 }) 15 16t .Run ("empty set includes nothing" ,func (t * testing.T ) { 17attributes := JSONAttributes {} 18assert .False (t ,attributes .Includes ("asize" )) 19 }) 20 21t .Run ("selected set includes only its members" ,func (t * testing.T ) { 22attributes := JSONAttributes {"asize" : {},"dsize" : {}} 23assert .True (t ,attributes .Includes ("asize" )) 24assert .True (t ,attributes .Includes ("dsize" )) 25assert .False (t ,attributes .Includes ("items" )) 26 }) 27}