added extra test case and revert multiple dummy items

This commit is contained in:
Héctor Giménez
2024-05-05 14:06:14 +09:00
parent 7af19bd16a
commit 54bc4a7e68
2 changed files with 26 additions and 17 deletions

View File

@@ -180,6 +180,25 @@ func TestRule_Evaluate(t *testing.T) {
},
wantErr: true,
},
{
name: "enhanceddamage should work for charms and not damage items",
fields: fields{
RawLine: "[name] == grandcharm && [quality] == magic # [enhanceddamage] >= 15 #",
Enabled: true,
},
args: args{
item: data.Item{
Identified: true,
ID: 605,
Name: "grandcharm",
Quality: item.QualityMagic,
Stats: []stat.Data{
{ID: stat.EnhancedDamage, Value: 15},
},
},
},
want: RuleResultFullMatch,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {