3
0

Fix flaky template integration test

Now uses statically prefix ("handle-_") + random chars.
This commit is contained in:
Denis Arh
2021-08-31 06:36:08 +02:00
parent 8d9a3d5430
commit dbe05b9eec

View File

@@ -131,7 +131,6 @@ func TestTemplateCreate(t *testing.T) {
h.apiInit().
Post("/template/").
Header("Accept", "application/json").
FormData("handle", rs()).
FormData("handle", "handle_"+rs()).
Expect(t).
Status(http.StatusOK).
@@ -147,7 +146,7 @@ func TestTemplateUpdateForbidden(t *testing.T) {
h.apiInit().
Put(fmt.Sprintf("/template/%d", u.ID)).
Header("Accept", "application/json").
FormData("handle", rs()).
FormData("handle", "handle_"+rs()).
Expect(t).
Status(http.StatusOK).
Assert(helpers.AssertError("template.errors.notAllowedToUpdate")).