Skip to content

Commit 13e8d84

Browse files
committed
Undo adding unnecessary ctx Data
1 parent 34c0068 commit 13e8d84

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

routers/web/repo/pull_review_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,28 @@ func TestRenderConversation(t *testing.T) {
5656
}
5757
run("diff with outdated", func(t *testing.T, ctx *context.Context, resp *httptest.ResponseRecorder) {
5858
ctx.Data["ShowOutdatedComments"] = true
59-
ctx.Data["IsIssue"] = true
6059
renderConversation(ctx, preparedComment, "diff")
6160
assert.Contains(t, resp.Body.String(), `<div class="content comment-container"`)
6261
})
6362
run("diff without outdated", func(t *testing.T, ctx *context.Context, resp *httptest.ResponseRecorder) {
6463
ctx.Data["ShowOutdatedComments"] = false
65-
ctx.Data["IsIssue"] = true
6664
renderConversation(ctx, preparedComment, "diff")
6765
assert.Contains(t, resp.Body.String(), `conversation-not-existing`)
6866
})
6967
run("timeline with outdated", func(t *testing.T, ctx *context.Context, resp *httptest.ResponseRecorder) {
7068
ctx.Data["ShowOutdatedComments"] = true
71-
ctx.Data["IsIssue"] = true
7269
renderConversation(ctx, preparedComment, "timeline")
7370
assert.Contains(t, resp.Body.String(), `<div id="code-comments-`)
7471
})
7572
run("timeline is not affected by ShowOutdatedComments=false", func(t *testing.T, ctx *context.Context, resp *httptest.ResponseRecorder) {
7673
ctx.Data["ShowOutdatedComments"] = false
77-
ctx.Data["IsIssue"] = true
7874
renderConversation(ctx, preparedComment, "timeline")
7975
assert.Contains(t, resp.Body.String(), `<div id="code-comments-`)
8076
})
8177
run("diff non-existing review", func(t *testing.T, ctx *context.Context, resp *httptest.ResponseRecorder) {
8278
err := db.TruncateBeans(db.DefaultContext, &issues_model.Review{})
8379
assert.NoError(t, err)
8480
ctx.Data["ShowOutdatedComments"] = true
85-
ctx.Data["IsIssue"] = true
8681
renderConversation(ctx, preparedComment, "diff")
8782
assert.Equal(t, http.StatusOK, resp.Code)
8883
assert.NotContains(t, resp.Body.String(), `status-page-500`)
@@ -91,7 +86,6 @@ func TestRenderConversation(t *testing.T) {
9186
err := db.TruncateBeans(db.DefaultContext, &issues_model.Review{})
9287
assert.NoError(t, err)
9388
ctx.Data["ShowOutdatedComments"] = true
94-
ctx.Data["IsIssue"] = true
9589
renderConversation(ctx, preparedComment, "timeline")
9690
assert.Equal(t, http.StatusOK, resp.Code)
9791
assert.NotContains(t, resp.Body.String(), `status-page-500`)

0 commit comments

Comments
 (0)