This commit is contained in:
mr
2024-11-28 13:19:01 +01:00
parent b388e43f30
commit 9ea342c4c4
37 changed files with 198 additions and 122 deletions

View File

@@ -4,6 +4,7 @@ import (
"testing"
"cloud.o-forge.io/core/oc-lib/models/utils"
"cloud.o-forge.io/core/oc-lib/tools"
"github.com/stretchr/testify/assert"
)
@@ -12,7 +13,7 @@ func TestStoreOneWorkflow(t *testing.T) {
AbstractObject: utils.AbstractObject{Name: "testWorkflow"},
}
wma := New("", nil)
wma := New(tools.WORKFLOW, "", nil, nil)
id, _, _ := wma.StoreOne(&w)
assert.NotEmpty(t, id)
@@ -23,7 +24,7 @@ func TestLoadOneWorkflow(t *testing.T) {
AbstractObject: utils.AbstractObject{Name: "testWorkflow"},
}
wma := New("", nil)
wma := New(tools.WORKFLOW, "", nil, nil)
new_w, _, _ := wma.StoreOne(&w)
assert.Equal(t, w, new_w)
}