@@ -54,15 +54,15 @@ func TestExactMatcherString(t *testing.T) {
5454 assert .NoError (t , err )
5555 assert .False (t , result )
5656
57- // Test error case
57+ // Test attribute not found
5858 user = entities.UserContext {
5959 Attributes : map [string ]interface {}{
6060 "string_not_foo" : "foo" ,
6161 },
6262 }
6363
6464 _ , err = matcher .Match (user )
65- assert .Error (t , err )
65+ assert .NoError (t , err )
6666}
6767
6868func TestExactMatcherBool (t * testing.T ) {
@@ -95,15 +95,15 @@ func TestExactMatcherBool(t *testing.T) {
9595 assert .NoError (t , err )
9696 assert .False (t , result )
9797
98- // Test error case
98+ // Test attribute not found
9999 user = entities.UserContext {
100100 Attributes : map [string ]interface {}{
101101 "not_bool_true" : true ,
102102 },
103103 }
104104
105105 _ , err = matcher .Match (user )
106- assert .Error (t , err )
106+ assert .NoError (t , err )
107107}
108108
109109func TestExactMatcherInt (t * testing.T ) {
@@ -147,15 +147,15 @@ func TestExactMatcherInt(t *testing.T) {
147147 assert .NoError (t , err )
148148 assert .False (t , result )
149149
150- // Test error case
150+ // Test attribute not found
151151 user = entities.UserContext {
152152 Attributes : map [string ]interface {}{
153153 "int_43" : 42 ,
154154 },
155155 }
156156
157157 _ , err = matcher .Match (user )
158- assert .Error (t , err )
158+ assert .NoError (t , err )
159159}
160160
161161func TestExactMatcherFloat (t * testing.T ) {
@@ -188,13 +188,13 @@ func TestExactMatcherFloat(t *testing.T) {
188188 assert .NoError (t , err )
189189 assert .False (t , result )
190190
191- // Test error case
191+ // Test attribute not found
192192 user = entities.UserContext {
193193 Attributes : map [string ]interface {}{
194194 "float_4_3" : 4.2 ,
195195 },
196196 }
197197
198198 _ , err = matcher .Match (user )
199- assert .Error (t , err )
199+ assert .NoError (t , err )
200200}
0 commit comments