@@ -56,37 +56,37 @@ func TestRenderConversation(t *testing.T) {
56
56
}
57
57
run ("diff with outdated" , func (t * testing.T , ctx * context.Context , resp * httptest.ResponseRecorder ) {
58
58
ctx .Data ["ShowOutdatedComments" ] = true
59
- renderConversation (ctx , preparedComment , "diff" , preparedComment . GetLineContent () )
59
+ renderConversation (ctx , preparedComment , "diff" )
60
60
assert .Contains (t , resp .Body .String (), `<div class="content comment-container"` )
61
61
})
62
62
run ("diff without outdated" , func (t * testing.T , ctx * context.Context , resp * httptest.ResponseRecorder ) {
63
63
ctx .Data ["ShowOutdatedComments" ] = false
64
- renderConversation (ctx , preparedComment , "diff" , preparedComment . GetLineContent () )
64
+ renderConversation (ctx , preparedComment , "diff" )
65
65
assert .Contains (t , resp .Body .String (), `conversation-not-existing` )
66
66
})
67
67
run ("timeline with outdated" , func (t * testing.T , ctx * context.Context , resp * httptest.ResponseRecorder ) {
68
68
ctx .Data ["ShowOutdatedComments" ] = true
69
- renderConversation (ctx , preparedComment , "timeline" , preparedComment . GetLineContent () )
69
+ renderConversation (ctx , preparedComment , "timeline" )
70
70
assert .Contains (t , resp .Body .String (), `<div id="code-comments-` )
71
71
})
72
72
run ("timeline is not affected by ShowOutdatedComments=false" , func (t * testing.T , ctx * context.Context , resp * httptest.ResponseRecorder ) {
73
73
ctx .Data ["ShowOutdatedComments" ] = false
74
- renderConversation (ctx , preparedComment , "timeline" , preparedComment . GetLineContent () )
74
+ renderConversation (ctx , preparedComment , "timeline" )
75
75
assert .Contains (t , resp .Body .String (), `<div id="code-comments-` )
76
76
})
77
77
run ("diff non-existing review" , func (t * testing.T , ctx * context.Context , resp * httptest.ResponseRecorder ) {
78
78
err := db .TruncateBeans (db .DefaultContext , & issues_model.Review {})
79
79
assert .NoError (t , err )
80
80
ctx .Data ["ShowOutdatedComments" ] = true
81
- renderConversation (ctx , preparedComment , "diff" , preparedComment . GetLineContent () )
81
+ renderConversation (ctx , preparedComment , "diff" )
82
82
assert .Equal (t , http .StatusOK , resp .Code )
83
83
assert .NotContains (t , resp .Body .String (), `status-page-500` )
84
84
})
85
85
run ("timeline non-existing review" , func (t * testing.T , ctx * context.Context , resp * httptest.ResponseRecorder ) {
86
86
err := db .TruncateBeans (db .DefaultContext , & issues_model.Review {})
87
87
assert .NoError (t , err )
88
88
ctx .Data ["ShowOutdatedComments" ] = true
89
- renderConversation (ctx , preparedComment , "timeline" , preparedComment . GetLineContent () )
89
+ renderConversation (ctx , preparedComment , "timeline" )
90
90
assert .Equal (t , http .StatusOK , resp .Code )
91
91
assert .NotContains (t , resp .Body .String (), `status-page-500` )
92
92
})
0 commit comments