diff --git a/app/rest/server_test.go b/app/rest/server_test.go index d233bed6..5a4d8492 100644 --- a/app/rest/server_test.go +++ b/app/rest/server_test.go @@ -60,7 +60,7 @@ func TestServer_CreateAndGet(t *testing.T) { defer cleanup(srv) // create comment - r := strings.NewReader(`{"text": "test 123", "locator":{"url": "https://radio-t.com/blah1", "site": "radio-t"}}`) + r := strings.NewReader(`{"text": "test *123*", "locator":{"url": "https://radio-t.com/blah1", "site": "radio-t"}}`) resp, err := http.Post(fmt.Sprintf("http://127.0.0.1:%d/api/v1/comment", port), "application/json", r) assert.Nil(t, err) assert.Equal(t, http.StatusCreated, resp.StatusCode) @@ -78,7 +78,7 @@ func TestServer_CreateAndGet(t *testing.T) { comment := store.Comment{} err = json.Unmarshal([]byte(res), &comment) assert.Nil(t, err) - assert.Equal(t, "test 123", comment.Text) + assert.Equal(t, "

test 123

", comment.Text) assert.Equal(t, store.User{Name: "developer one", ID: "dev", Picture: "https://friends.radio-t.com/resources/images/rt_logo_64.png", Profile: "https://radio-t.com/info/", Admin: true, Blocked: false, IP: ""}, @@ -148,7 +148,7 @@ func TestServer_Update(t *testing.T) { err = json.Unmarshal(body, &c2) assert.Nil(t, err) assert.Equal(t, id, c2.ID) - assert.Equal(t, "updated text", c2.Text) + assert.Equal(t, "

updated text

", c2.Text) assert.Equal(t, "my edit", c2.Edit.Summary) assert.True(t, time.Since(c2.Edit.Timestamp) < 1*time.Second)