mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	@@ -449,13 +449,13 @@ func TestFollowUser(t *testing.T) {
 | 
			
		||||
	assert.NoError(t, unittest.PrepareTestDatabase())
 | 
			
		||||
 | 
			
		||||
	testSuccess := func(followerID, followedID int64) {
 | 
			
		||||
		assert.NoError(t, user_model.FollowUser(followerID, followedID))
 | 
			
		||||
		assert.NoError(t, user_model.FollowUser(db.DefaultContext, followerID, followedID))
 | 
			
		||||
		unittest.AssertExistsAndLoadBean(t, &user_model.Follow{UserID: followerID, FollowID: followedID})
 | 
			
		||||
	}
 | 
			
		||||
	testSuccess(4, 2)
 | 
			
		||||
	testSuccess(5, 2)
 | 
			
		||||
 | 
			
		||||
	assert.NoError(t, user_model.FollowUser(2, 2))
 | 
			
		||||
	assert.NoError(t, user_model.FollowUser(db.DefaultContext, 2, 2))
 | 
			
		||||
 | 
			
		||||
	unittest.CheckConsistencyFor(t, &user_model.User{})
 | 
			
		||||
}
 | 
			
		||||
@@ -464,7 +464,7 @@ func TestUnfollowUser(t *testing.T) {
 | 
			
		||||
	assert.NoError(t, unittest.PrepareTestDatabase())
 | 
			
		||||
 | 
			
		||||
	testSuccess := func(followerID, followedID int64) {
 | 
			
		||||
		assert.NoError(t, user_model.UnfollowUser(followerID, followedID))
 | 
			
		||||
		assert.NoError(t, user_model.UnfollowUser(db.DefaultContext, followerID, followedID))
 | 
			
		||||
		unittest.AssertNotExistsBean(t, &user_model.Follow{UserID: followerID, FollowID: followedID})
 | 
			
		||||
	}
 | 
			
		||||
	testSuccess(4, 2)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user