@@ -130,11 +130,11 @@ func TestConversation_InsertConversation(t *testing.T) {
130130 assert .NoError (t , unittest .PrepareTestDatabase ())
131131
132132 // there are 5 conversations and max index is 5 on repository 1, so this one should 6
133- conversation := testInsertConversation (t , "my conversation1" , "special conversation's comments?" , 6 )
133+ conversation := testInsertConversation (t , "my conversation1" , 6 )
134134 _ , err := db .DeleteByID [conversations_model.Conversation ](db .DefaultContext , conversation .ID )
135135 assert .NoError (t , err )
136136
137- conversation = testInsertConversation (t , `my conversation2, this is my son's love \n \r \ ` , "special conversation's '' comments?" , 7 )
137+ conversation = testInsertConversation (t , `my conversation2, this is my son's love \n \r \ ` , 7 )
138138 _ , err = db .DeleteByID [conversations_model.Conversation ](db .DefaultContext , conversation .ID )
139139 assert .NoError (t , err )
140140}
@@ -146,7 +146,7 @@ func TestResourceIndex(t *testing.T) {
146146 for i := 0 ; i < 100 ; i ++ {
147147 wg .Add (1 )
148148 go func (i int ) {
149- testInsertConversation (t , fmt .Sprintf ("conversation %d" , i + 1 ), "my conversation" , 0 )
149+ testInsertConversation (t , fmt .Sprintf ("conversation %d" , i + 1 ), 0 )
150150 wg .Done ()
151151 }(i )
152152 }
@@ -168,7 +168,7 @@ func TestCorrectConversationStats(t *testing.T) {
168168 for i := 0 ; i < conversationAmount ; i ++ {
169169 wg .Add (1 )
170170 go func (i int ) {
171- testInsertConversation (t , fmt .Sprintf ("Conversation %d" , i + 1 ), "Bugs are nasty" , 0 )
171+ testInsertConversation (t , fmt .Sprintf ("Conversation %d" , i + 1 ), 0 )
172172 wg .Done ()
173173 }(i )
174174 }
@@ -228,7 +228,11 @@ func TestConversationLoadAttributes(t *testing.T) {
228228 }
229229}
230230
231- func assertCreateConversations (t * testing.T , isPull bool ) {
231+ func TestCreateConversation (t * testing.T ) {
232+ assertCreateConversations (t )
233+ }
234+
235+ func assertCreateConversations (t * testing.T ) {
232236 assert .NoError (t , unittest .PrepareTestDatabase ())
233237 reponame := "repo1"
234238 repo := unittest .AssertExistsAndLoadBean (t , & repo_model.Repository {Name : reponame })
@@ -245,7 +249,7 @@ func assertCreateConversations(t *testing.T, isPull bool) {
245249 unittest .AssertExistsAndLoadBean (t , & conversations_model.Conversation {RepoID : repo .ID , ID : conversationID })
246250}
247251
248- func testInsertConversation (t * testing.T , title , content string , expectIndex int64 ) * conversations_model.Conversation {
252+ func testInsertConversation (t * testing.T , title string , expectIndex int64 ) * conversations_model.Conversation {
249253 var newConversation conversations_model.Conversation
250254 t .Run (title , func (t * testing.T ) {
251255 repo := unittest .AssertExistsAndLoadBean (t , & repo_model.Repository {ID : 1 })
0 commit comments