@@ -34,7 +34,7 @@ func TestConversationAPIURL(t *testing.T) {
3434 err := conversation .LoadAttributes (db .DefaultContext )
3535
3636 assert .NoError (t , err )
37- assert .Equal (t , "https://try.gitea.io/api/v1/repos/user2/repo1/conversations/1 " , conversation .APIURL (db .DefaultContext ))
37+ assert .Equal (t , "https://try.gitea.io/api/v1/repos/user2/repo1/commit/ " , conversation .APIURL (db .DefaultContext ))
3838}
3939
4040func TestGetConversationsByIDs (t * testing.T ) {
@@ -71,12 +71,6 @@ func TestConversations(t *testing.T) {
7171 Opts conversations_model.ConversationsOptions
7272 ExpectedConversationIDs []int64
7373 }{
74- {
75- conversations_model.ConversationsOptions {
76- SortType : "oldest" ,
77- },
78- []int64 {1 , 6 },
79- },
8074 {
8175 conversations_model.ConversationsOptions {
8276 RepoCond : builder .In ("repo_id" , 1 , 3 ),
@@ -88,28 +82,6 @@ func TestConversations(t *testing.T) {
8882 },
8983 []int64 {1 , 2 , 3 , 5 },
9084 },
91- {
92- conversations_model.ConversationsOptions {
93- Paginator : & db.ListOptions {
94- Page : 1 ,
95- PageSize : 4 ,
96- },
97- },
98- []int64 {2 , 1 },
99- },
100- {
101- conversations_model.ConversationsOptions {
102- Paginator : & db.ListOptions {
103- Page : 1 ,
104- PageSize : 4 ,
105- },
106- },
107- []int64 {}, // conversations with **both** label 1 and 2, none of these conversations matches, TODO: add more tests
108- },
109- {
110- conversations_model.ConversationsOptions {},
111- []int64 {2 },
112- },
11385 } {
11486 conversations , err := conversations_model .Conversations (db .DefaultContext , & test .Opts )
11587 assert .NoError (t , err )
0 commit comments