| 1 | package pushbullet_testscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/ |
| 2 | |
| 3 | import ( |
| 4 | "errorsscip-go gomod github.com/golang/go/src . errors/" |
| 5 | "net/urlscip-go gomod github.com/golang/go/src . `net/url`/" |
| 6 | "osscip-go gomod github.com/golang/go/src . os/" |
| 7 | "testingscip-go gomod github.com/golang/go/src . testing/" |
| 8 | |
| 9 | "github.com/jarcoal/httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/" |
| 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 | |
| 13 | "github.com/nicholas-fedor/shoutrrr/internal/testutilsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/internal/testutils`/" |
| 14 | "github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/" |
| 15 | ) |
| 16 | |
| 17 | var ( |
| 18 | servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service. *pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.Servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service# |
| 19 | envPushbulletURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/envPushbulletURL. *urlscip-go gomod github.com/golang/go/src . `net/url`/.URLscip-go gomod github.com/golang/go/src . `net/url`/URL# |
| 20 | _ = ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.BeforeSuitescip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/BeforeSuite().(func() { |
| 21 | servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service. = &pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.Servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#{} |
| 22 | envPushbulletURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/envPushbulletURL., _ = urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().(osscip-go gomod github.com/golang/go/src . os/.Getenvscip-go gomod github.com/golang/go/src . os/Getenv().("SHOUTRRR_PUSHBULLET_URL")) |
| 23 | }) |
| 24 | ) |
| 25 | |
| 26 | 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().("the pushbullet service", func() { |
| 27 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Whenscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/When().("running integration tests", func() { |
| 28 | 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 not error out", func() { |
| 29 | if envPushbulletURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/envPushbulletURL..Stringscip-go gomod github.com/golang/go/src . `net/url`/URL#String().() == "" { |
| 30 | return |
| 31 | } |
| 32 | |
| 33 | serviceURL, _ := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().(envPushbulletURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/envPushbulletURL..Stringscip-go gomod github.com/golang/go/src . `net/url`/URL#String().()) |
| 34 | err := servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service..Initializescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#Initialize().(serviceURL, testutilsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/internal/testutils`/.TestLoggerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/internal/testutils`/TestLogger().()) |
| 35 | 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().()) |
| 36 | err = servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service..Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#Send().("This is an integration test message", nil) |
| 37 | 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().()) |
| 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().("returns the correct service identifier", func() { |
| 40 | 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().(servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service..GetIDscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#GetID().()).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().("pushbullet")) |
| 41 | }) |
| 42 | }) |
| 43 | |
| 44 | 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().("the pushbullet config", func() { |
| 45 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Whenscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/When().("generating a config object", func() { |
| 46 | 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 set token", func() { |
| 47 | pushbulletURL, _ := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().("pushbullet://tokentokentokentokentokentokentoke") |
| 48 | config := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#{} |
| 49 | err := config.SetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#SetURL().(pushbulletURL) |
| 50 | |
| 51 | 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().(config.Tokenscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#Token.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().("tokentokentokentokentokentokentoke")) |
| 52 | 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().()) |
| 53 | }) |
| 54 | |
| 55 | 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 set the device from path", func() { |
| 56 | pushbulletURL, _ := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().( |
| 57 | "pushbullet://tokentokentokentokentokentokentoke/test", |
| 58 | ) |
| 59 | config := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#{} |
| 60 | err := config.SetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#SetURL().(pushbulletURL) |
| 61 | |
| 62 | 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().()) |
| 63 | 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().(config.Targetsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#Targets.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.HaveLenscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveLen().(1)) |
| 64 | 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().(config.Targetsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#Targets.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.ContainElementsscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/ContainElements().("test")) |
| 65 | }) |
| 66 | |
| 67 | 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 set the channel from path", func() { |
| 68 | pushbulletURL, _ := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().( |
| 69 | "pushbullet://tokentokentokentokentokentokentoke/foo#bar", |
| 70 | ) |
| 71 | config := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#{} |
| 72 | err := config.SetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#SetURL().(pushbulletURL) |
| 73 | |
| 74 | 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().()) |
| 75 | 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().(config.Targetsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#Targets.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.HaveLenscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveLen().(2)) |
| 76 | 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().(config.Targetsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#Targets.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.ContainElementsscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/ContainElements().("foo", "#bar")) |
| 77 | }) |
| 78 | }) |
| 79 | |
| 80 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Whenscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/When().("parsing the configuration URL", func() { |
| 81 | 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 be identical after de-/serialization", func() { |
| 82 | testURL := "pushbullet://tokentokentokentokentokentokentoke/device?title=Great+News" |
| 83 | |
| 84 | config := &pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#{} |
| 85 | err := config.SetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#SetURL().(testutilsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/internal/testutils`/.URLMustscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/internal/testutils`/URLMust().(testURL)) |
| 86 | 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().(), "verifying") |
| 87 | |
| 88 | outputURL := config.GetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Config#GetURL().() |
| 89 | 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().(outputURL.Stringscip-go gomod github.com/golang/go/src . `net/url`/URL#String().()).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().(testURL)) |
| 90 | }) |
| 91 | }) |
| 92 | }) |
| 93 | |
| 94 | 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().("building the payload", func() { |
| 95 | 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().("Email target should only populate one the correct field", func() { |
| 96 | push := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.PushRequestscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#{} |
| 97 | push.SetTargetscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#SetTarget().("[email protected]") |
| 98 | 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().(push.Emailscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#Email.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().("[email protected]")) |
| 99 | 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().(push.DeviceIdenscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#DeviceIden.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.BeEmptyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/BeEmpty().()) |
| 100 | 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().(push.ChannelTagscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#ChannelTag.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.BeEmptyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/BeEmpty().()) |
| 101 | }) |
| 102 | |
| 103 | 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().("Device target should only populate one the correct field", func() { |
| 104 | push := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.PushRequestscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#{} |
| 105 | push.SetTargetscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#SetTarget().("device") |
| 106 | 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().(push.Emailscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#Email.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.BeEmptyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/BeEmpty().()) |
| 107 | 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().(push.DeviceIdenscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#DeviceIden.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().("device")) |
| 108 | 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().(push.ChannelTagscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#ChannelTag.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.BeEmptyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/BeEmpty().()) |
| 109 | }) |
| 110 | |
| 111 | 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().("Channel target should only populate one the correct field", func() { |
| 112 | push := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.PushRequestscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#{} |
| 113 | push.SetTargetscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#SetTarget().("#channel") |
| 114 | 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().(push.Emailscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#Email.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.BeEmptyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/BeEmpty().()) |
| 115 | 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().(push.DeviceIdenscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#DeviceIden.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.BeEmptyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/BeEmpty().()) |
| 116 | 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().(push.ChannelTagscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushRequest#ChannelTag.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().("channel")) |
| 117 | }) |
| 118 | }) |
| 119 | |
| 120 | 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().("sending the payload", func() { |
| 121 | var errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. error |
| 122 | |
| 123 | targetURL := "https://api.pushbullet.com/v2/pushes" |
| 124 | |
| 125 | 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() { |
| 126 | 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().() |
| 127 | }) |
| 128 | |
| 129 | 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() { |
| 130 | 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().() |
| 131 | }) |
| 132 | |
| 133 | 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 not report an error if the server accepts the payload", func() { |
| 134 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = initServicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/initService().() |
| 135 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_: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().()) |
| 136 | |
| 137 | response := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.PushResponsescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#{ |
| 138 | Typescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Type.: "note", |
| 139 | Bodyscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Body.: "Message", |
| 140 | Titlescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Title.: "Shoutrrr notification", // Matches default |
| 141 | Activescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Active.: true, |
| 142 | } |
| 143 | responder, _ := httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewJsonResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewJsonResponder().(200, &response) |
| 144 | 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().("POST", targetURL, responder) |
| 145 | |
| 146 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service..Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#Send().("Message", nil) |
| 147 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_: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().()) |
| 148 | }) |
| 149 | |
| 150 | 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 not panic if an error occurs when sending the payload", func() { |
| 151 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = initServicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/initService().() |
| 152 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_: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().()) |
| 153 | |
| 154 | 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().( |
| 155 | "POST", |
| 156 | targetURL, |
| 157 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewErrorResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewErrorResponder().(errorsscip-go gomod github.com/golang/go/src . errors/.Newscip-go gomod github.com/golang/go/src . errors/New().("")), |
| 158 | ) |
| 159 | |
| 160 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service..Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#Send().("Message", nil) |
| 161 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().()) |
| 162 | }) |
| 163 | |
| 164 | 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 an error if the response type is incorrect", func() { |
| 165 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = initServicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/initService().() |
| 166 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_: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().()) |
| 167 | |
| 168 | response := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.PushResponsescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#{ |
| 169 | Typescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Type.: "link", // Incorrect type |
| 170 | Bodyscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Body.: "Message", |
| 171 | Titlescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Title.: "Shoutrrr notification", |
| 172 | Activescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Active.: true, |
| 173 | } |
| 174 | responder, _ := httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewJsonResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewJsonResponder().(200, &response) |
| 175 | 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().("POST", targetURL, responder) |
| 176 | |
| 177 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service..Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#Send().("Message", nil) |
| 178 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().()) |
| 179 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err..Error()).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.ContainSubstringscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/ContainSubstring().("unexpected response type")) |
| 180 | }) |
| 181 | |
| 182 | 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 an error if the response body does not match", func() { |
| 183 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = initServicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/initService().() |
| 184 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_: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().()) |
| 185 | |
| 186 | response := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.PushResponsescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#{ |
| 187 | Typescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Type.: "note", |
| 188 | Bodyscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Body.: "Wrong message", |
| 189 | Titlescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Title.: "Shoutrrr notification", |
| 190 | Activescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Active.: true, |
| 191 | } |
| 192 | responder, _ := httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewJsonResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewJsonResponder().(200, &response) |
| 193 | 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().("POST", targetURL, responder) |
| 194 | |
| 195 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service..Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#Send().("Message", nil) |
| 196 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().()) |
| 197 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err..Error()).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.ContainSubstringscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/ContainSubstring().("response body mismatch")) |
| 198 | }) |
| 199 | |
| 200 | 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 an error if the response title does not match", func() { |
| 201 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = initServicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/initService().() |
| 202 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_: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().()) |
| 203 | |
| 204 | response := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.PushResponsescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#{ |
| 205 | Typescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Type.: "note", |
| 206 | Bodyscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Body.: "Message", |
| 207 | Titlescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Title.: "Wrong Title", |
| 208 | Activescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Active.: true, |
| 209 | } |
| 210 | responder, _ := httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewJsonResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewJsonResponder().(200, &response) |
| 211 | 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().("POST", targetURL, responder) |
| 212 | |
| 213 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service..Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#Send().("Message", nil) |
| 214 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().()) |
| 215 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err..Error()).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.ContainSubstringscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/ContainSubstring().("response title mismatch")) |
| 216 | }) |
| 217 | |
| 218 | 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 an error if the push is not active", func() { |
| 219 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = initServicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/initService().() |
| 220 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_: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().()) |
| 221 | |
| 222 | response := pushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/.PushResponsescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#{ |
| 223 | Typescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Type.: "note", |
| 224 | Bodyscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Body.: "Message", |
| 225 | Titlescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Title.: "Shoutrrr notification", // Matches default |
| 226 | Activescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/PushResponse#Active.: false, |
| 227 | } |
| 228 | responder, _ := httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewJsonResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewJsonResponder().(200, &response) |
| 229 | 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().("POST", targetURL, responder) |
| 230 | |
| 231 | errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err. = servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service..Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#Send().("Message", nil) |
| 232 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err.).Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(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().()) |
| 233 | 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().(errscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/_:err..Error()). |
| 234 | Toscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#To().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.ContainSubstringscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/ContainSubstring().("push notification is not active")) |
| 235 | }) |
| 236 | }) |
| 237 | }) |
| 238 | |
| 239 | func TestPushbulletscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/TestPushbullet().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 240 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 241 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.RegisterFailHandlerscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/RegisterFailHandler().(ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Failscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/Fail().) |
| 242 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.RunSpecsscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/RunSpecs().(t, "Shoutrrr Pushbullet Suite") |
| 243 | } |
| 244 | |
| 245 | // initService initializes the service with a fixed test configuration. |
| 246 | func initServicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/initService().() error { |
| 247 | serviceURL, err := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().("pushbullet://tokentokentokentokentokentokentoke/test") |
| 248 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.ExpectWithOffsetscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/ExpectWithOffset().(1, 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().()) |
| 249 | |
| 250 | return servicescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet_test`/service..Initializescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/pushbullet`/Service#Initialize().(serviceURL, testutilsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/internal/testutils`/.TestLoggerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/internal/testutils`/TestLogger().()) |
| 251 | } |