/
uzer_007
/
Rixea
Обзор
Документация
Войти
/
uzer_007
/
Rixea
Код
Запросы
0
Задачи
Вики
Пакеты
5
Релизы
2
CI/CD
Аналитика
Безопасность
master
services/pull/comment_test.go
25 строк
815 B
uzer_007
feat: первая версия Rixea
02 авг 2026, 22:16
02 авг 2026, 22:16
d4f7504
Код
Авторство
О чём код?
// Copyright 2026 Uzer_007. All rights reserved. // SPDX-License-Identifier: MIT package pull import ( "testing" issues_model "gitverse.ru/uzer_007/Rixea/models/issues" "github.com/stretchr/testify/assert" ) func TestRemoveAlreadyCommentedCommitIDs(t *testing.T) { comments := []*issues_model.Comment{ {Type: issues_model.CommentTypePullRequestPush, Content: `{"commit_ids":["first","second"]}`}, {Type: issues_model.CommentTypePullRequestPush, Content: `{"is_force_push":true,"commit_ids":["second","third"]}`}, {Type: issues_model.CommentTypePullRequestPush, Content: `invalid`}, } data := &issues_model.PushActionContent{CommitIDs: []string{"first", "second", "third", "fourth"}} removeAlreadyCommentedCommitIDs(comments, data) assert.Equal(t, []string{"third", "fourth"}, data.CommitIDs) }