| 1 | package telegram_testscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/ |
| 2 | |
| 3 | import ( |
| 4 | "fmtscip-go gomod github.com/golang/go/src . fmt/" |
| 5 | "ioscip-go gomod github.com/golang/go/src . io/" |
| 6 | "stringsscip-go gomod github.com/golang/go/src . strings/" |
| 7 | |
| 8 | "github.com/jarcoal/httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/" |
| 9 | "github.com/mattn/go-colorablescip-go gomod github.com/mattn/go-colorable v0.1.15 `github.com/mattn/go-colorable`/" |
| 10 | "github.com/onsi/ginkgo/v2scip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/" |
| 11 | "github.com/onsi/gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/" |
| 12 | "github.com/onsi/gomega/gbytesscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/" |
| 13 | |
| 14 | "github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/" |
| 15 | ) |
| 16 | |
| 17 | const ( |
| 18 | mockTokenscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockToken. = `0:MockToken` |
| 19 | mockAPIBasescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockAPIBase. = "https://api.telegram.org/bot" + mockTokenscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockToken. + "/" |
| 20 | ) |
| 21 | |
| 22 | var ( |
| 23 | userOutscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userOut. *gbytesscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/.Bufferscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/Buffer# |
| 24 | userInscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userIn. *gbytesscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/.Bufferscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/Buffer# |
| 25 | userInMonoscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userInMono. ioscip-go gomod github.com/golang/go/src . io/.Writerscip-go gomod github.com/golang/go/src . io/Writer# |
| 26 | ) |
| 27 | |
| 28 | var _ = ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Describescip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/Describe().("TelegramGenerator", func() { |
| 29 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.BeforeEachscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/BeforeEach().(func() { |
| 30 | userOutscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userOut. = gbytesscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/.NewBufferscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/NewBuffer().() |
| 31 | userInscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userIn. = gbytesscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/.NewBufferscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/NewBuffer().() |
| 32 | userInMonoscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userInMono. = colorablescip-go gomod github.com/mattn/go-colorable v0.1.15 `github.com/mattn/go-colorable`/.NewNonColorablescip-go gomod github.com/mattn/go-colorable v0.1.15 `github.com/mattn/go-colorable`/NewNonColorable().(userInscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userIn.) |
| 33 | |
| 34 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.Activatescip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/Activate().() |
| 35 | }) |
| 36 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.AfterEachscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/AfterEach().(func() { |
| 37 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.DeactivateAndResetscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/DeactivateAndReset().() |
| 38 | }) |
| 39 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Itscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/It().("should return the ", func() { |
| 40 | gen := telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.Generatorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Generator#{ |
| 41 | Readerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Generator#Reader.: userOutscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userOut., |
| 42 | Writerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Generator#Writer.: userInMonoscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userInMono., |
| 43 | } |
| 44 | |
| 45 | resultChannel := make(chan string, 1) |
| 46 | |
| 47 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.RegisterResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/RegisterResponder().( |
| 48 | "GET", |
| 49 | mockAPIscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockAPI().(`getMe`), |
| 50 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewJsonResponderOrPanicscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewJsonResponderOrPanic().(200, &struct { |
| 51 | OKscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/_:OK. bool |
| 52 | Resultscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/_:Result. *telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.Userscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/User# |
| 53 | }{ |
| 54 | true, &telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.Userscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/User#{ |
| 55 | IDscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/User#ID.: 1, |
| 56 | IsBotscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/User#IsBot.: true, |
| 57 | Usernamescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/User#Username.: "mockbot", |
| 58 | }, |
| 59 | }), |
| 60 | ) |
| 61 | |
| 62 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.RegisterResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/RegisterResponder().( |
| 63 | "POST", |
| 64 | mockAPIscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockAPI().(`getUpdates`), |
| 65 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewJsonResponderOrPanicscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewJsonResponderOrPanic().(200, &struct { |
| 66 | OKscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/_:OK. bool |
| 67 | Resultscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/_:Result. []telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.Updatescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Update# |
| 68 | }{ |
| 69 | true, |
| 70 | []telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.Updatescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Update#{ |
| 71 | { |
| 72 | ChatMemberUpdatescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Update#ChatMemberUpdate.: &telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.ChatMemberUpdatescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/ChatMemberUpdate#{ |
| 73 | Chatscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/ChatMemberUpdate#Chat.: &telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.Chatscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Chat#{Typescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Chat#Type.: `channel`, Titlescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Chat#Title.: `mockChannel`}, |
| 74 | OldChatMemberscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/ChatMemberUpdate#OldChatMember.: &telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.ChatMemberscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/ChatMember#{Statusscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/ChatMember#Status.: `kicked`}, |
| 75 | NewChatMemberscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/ChatMemberUpdate#NewChatMember.: &telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.ChatMemberscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/ChatMember#{Statusscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/ChatMember#Status.: `administrator`}, |
| 76 | }, |
| 77 | }, |
| 78 | { |
| 79 | Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Update#Message.: &telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Message#{ |
| 80 | Textscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Message#Text.: "hi!", |
| 81 | Fromscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Message#From.: &telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.Userscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/User#{Usernamescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/User#Username.: `mockUser`}, |
| 82 | Chatscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Message#Chat.: &telegramscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/.Chatscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Chat#{Typescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Chat#Type.: `private`, IDscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Chat#ID.: 667, Usernamescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Chat#Username.: `mockUser`}, |
| 83 | }, |
| 84 | }, |
| 85 | }, |
| 86 | }), |
| 87 | ) |
| 88 | |
| 89 | go func() { |
| 90 | defer ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.GinkgoRecoverscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/GinkgoRecover().() |
| 91 | |
| 92 | conf, err := gen.Generatescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram`/Generator#Generate().(nil, nil, nil) |
| 93 | |
| 94 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Expectscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Expect().(conf).ToNotscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#ToNot().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.BeNilscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/BeNil().()) |
| 95 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Expectscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 96 | |
| 97 | resultChannel <- conf.GetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/ServiceConfig#GetURL.().Stringscip-go gomod github.com/golang/go/src . `net/url`/URL#String().() |
| 98 | }() |
| 99 | |
| 100 | defer dumpBuffersscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/dumpBuffers().() |
| 101 | |
| 102 | mockTypedscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockTyped().(mockTokenscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockToken.) |
| 103 | mockTypedscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockTyped().(`no`) |
| 104 | |
| 105 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Eventuallyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Eventually().(userInscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userIn.). |
| 106 | Shouldscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/AsyncAssertion#Should().(gbytesscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/.Sayscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/Say().(`Got a bot chat member update for mockChannel, status was changed from kicked to administrator`)) |
| 107 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Eventuallyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Eventually().(userInscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userIn.). |
| 108 | Shouldscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/AsyncAssertion#Should().(gbytesscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/.Sayscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/Say().(`Got 1 chat ID\(s\) so far\. Want to add some more\?`)) |
| 109 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Eventuallyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Eventually().(userInscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userIn.).Shouldscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/AsyncAssertion#Should().(gbytesscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/.Sayscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/Say().(`Selected chats:`)) |
| 110 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Eventuallyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Eventually().(userInscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userIn.).Shouldscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/AsyncAssertion#Should().(gbytesscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/.Sayscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/Say().(`667 \(private\) @mockUser`)) |
| 111 | |
| 112 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Eventuallyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Eventually().(resultChannel). |
| 113 | Shouldscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/AsyncAssertion#Should().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Receivescip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Receive().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Equalscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Equal().(`telegram://0:MockToken@telegram?chats=667&preview=No`))) |
| 114 | }) |
| 115 | }) |
| 116 | |
| 117 | func mockAPIscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockAPI().(endpoint string) string { |
| 118 | return mockAPIBasescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockAPIBase. + endpoint |
| 119 | } |
| 120 | |
| 121 | func mockTypedscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/mockTyped().(a ...any) { |
| 122 | _, _ = fmtscip-go gomod github.com/golang/go/src . fmt/.Fprintfscip-go gomod github.com/golang/go/src . fmt/Fprintf().(userOutscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userOut., "%v\n", fmtscip-go gomod github.com/golang/go/src . fmt/.Sprintscip-go gomod github.com/golang/go/src . fmt/Sprint().(a...)) |
| 123 | } |
| 124 | |
| 125 | func dumpBuffersscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/dumpBuffers().() { |
| 126 | for line := range stringsscip-go gomod github.com/golang/go/src . strings/.SplitSeqscip-go gomod github.com/golang/go/src . strings/SplitSeq().(string(userInscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userIn..Contentsscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/Buffer#Contents().()), "\n") { |
| 127 | _, _ = fmtscip-go gomod github.com/golang/go/src . fmt/.Fprintfscip-go gomod github.com/golang/go/src . fmt/Fprintf().(ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.GinkgoWriterscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/GinkgoWriter., "> %s\n", line) |
| 128 | } |
| 129 | |
| 130 | for line := range stringsscip-go gomod github.com/golang/go/src . strings/.SplitSeqscip-go gomod github.com/golang/go/src . strings/SplitSeq().(string(userOutscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/telegram_test`/userOut..Contentsscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/gbytes`/Buffer#Contents().()), "\n") { |
| 131 | _, _ = fmtscip-go gomod github.com/golang/go/src . fmt/.Fprintfscip-go gomod github.com/golang/go/src . fmt/Fprintf().(ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.GinkgoWriterscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/GinkgoWriter., "< %s\n", line) |
| 132 | } |
| 133 | } |