Fix broken test introduced in previous commit
This commit is contained in:
@@ -3,6 +3,8 @@ package processor
|
||||
import (
|
||||
"cook/utils"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
)
|
||||
|
||||
func TestSurgicalJSONEditing(t *testing.T) {
|
||||
@@ -591,6 +593,7 @@ func TestRetardedJSONEditing(t *testing.T) {
|
||||
for _, cmd := range commands {
|
||||
result = result[:cmd.From] + cmd.With + result[cmd.To:]
|
||||
}
|
||||
|
||||
|
||||
// Check that the weight was changed
|
||||
if result != expected {
|
||||
@@ -777,9 +780,7 @@ func TestRetardedJSONEditing2(t *testing.T) {
|
||||
],
|
||||
"ParentTags": []
|
||||
}
|
||||
,"AdditionalStats": {
|
||||
"(Value=\"BaseDeepMiningDrillSpeed_+%\")": 4000
|
||||
}
|
||||
,"AdditionalStats": {"(Value=\"BaseDeepMiningDrillSpeed_+%\")":4000}}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -818,8 +819,9 @@ func TestRetardedJSONEditing2(t *testing.T) {
|
||||
result = result[:cmd.From] + cmd.With + result[cmd.To:]
|
||||
}
|
||||
|
||||
// Check that the weight was changed
|
||||
if result != expected {
|
||||
t.Errorf("Expected:\n%s\nGot:\n%s", expected, result)
|
||||
}
|
||||
|
||||
diff := cmp.Diff(result, expected)
|
||||
if diff != "" {
|
||||
t.Errorf("Differences:\n%s", diff)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user