autogits/workflow-pr/pr_test.go

20 lines
426 B
Go
Raw Normal View History

2024-12-02 10:26:51 +01:00
package main
2024-12-04 08:55:40 +01:00
import (
"testing"
"go.uber.org/mock/gomock"
"src.opensuse.org/autogits/common/gitea-generated/models"
mock_main "src.opensuse.org/workflow-pr/mock"
)
2024-12-02 10:26:51 +01:00
func TestPR(t *testing.T) {
t.Run("Test simple PR to PrjGit checkout", func(t *testing.T) {
2024-12-04 08:55:40 +01:00
ctl := gomock.NewController(t)
pr := mock_main.NewMockGiteaPRInterface(ctl)
pr.EXPECT().GetPR("foo", "bar", 22).Return(&models.PullRequest{}, nil)
2024-12-02 10:26:51 +01:00
})
}