| 1 | package matrixscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/ |
| 2 | |
| 3 | import ( |
| 4 | "net/urlscip-go gomod github.com/golang/go/src . `net/url`/" |
| 5 | |
| 6 | "github.com/onsi/gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/" |
| 7 | |
| 8 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/ "github.com/onsi/ginkgo/v2scip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/" |
| 9 | ) |
| 10 | |
| 11 | 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().("Config", func() { |
| 12 | 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().("GetURL", func() { |
| 13 | 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 generate URL with scheme and host", func() { |
| 14 | cfg := &Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#{ |
| 15 | Hostscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Host.: "matrix.example.com", |
| 16 | Userscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#User.: "testuser", |
| 17 | Passwordscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Password.: "testpass", |
| 18 | } |
| 19 | |
| 20 | resultURL := cfg.GetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#GetURL().() |
| 21 | 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().(resultURL.Schemescip-go gomod github.com/golang/go/src . `net/url`/URL#Scheme.).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().(Schemescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Scheme.)) |
| 22 | 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().(resultURL.Hostscip-go gomod github.com/golang/go/src . `net/url`/URL#Host.).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().("matrix.example.com")) |
| 23 | }) |
| 24 | |
| 25 | 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 include user in URL", func() { |
| 26 | cfg := &Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#{ |
| 27 | Hostscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Host.: "matrix.example.com", |
| 28 | Userscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#User.: "testuser", |
| 29 | Passwordscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Password.: "testpass", |
| 30 | } |
| 31 | |
| 32 | resultURL := cfg.GetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#GetURL().() |
| 33 | 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().(resultURL.Userscip-go gomod github.com/golang/go/src . `net/url`/URL#User..Usernamescip-go gomod github.com/golang/go/src . `net/url`/Userinfo#Username().()).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().("testuser")) |
| 34 | }) |
| 35 | |
| 36 | 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 include password in URL", func() { |
| 37 | cfg := &Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#{ |
| 38 | Hostscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Host.: "matrix.example.com", |
| 39 | Userscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#User.: "testuser", |
| 40 | Passwordscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Password.: "testpass", |
| 41 | } |
| 42 | |
| 43 | resultURL := cfg.GetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#GetURL().() |
| 44 | password, ok := resultURL.Userscip-go gomod github.com/golang/go/src . `net/url`/URL#User..Passwordscip-go gomod github.com/golang/go/src . `net/url`/Userinfo#Password().() |
| 45 | 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().(ok).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`/.BeTruescip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/BeTrue().()) |
| 46 | 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().(password).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().("testpass")) |
| 47 | }) |
| 48 | |
| 49 | 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 ForceQuery to true", func() { |
| 50 | cfg := &Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#{ |
| 51 | Hostscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Host.: "matrix.example.com", |
| 52 | Userscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#User.: "testuser", |
| 53 | Passwordscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Password.: "testpass", |
| 54 | } |
| 55 | |
| 56 | resultURL := cfg.GetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#GetURL().() |
| 57 | 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().(resultURL.ForceQueryscip-go gomod github.com/golang/go/src . `net/url`/URL#ForceQuery.).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`/.BeTruescip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/BeTrue().()) |
| 58 | }) |
| 59 | }) |
| 60 | |
| 61 | 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().("SetURL", func() { |
| 62 | 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 parse valid URL and set fields", func() { |
| 63 | cfg := &Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#{} |
| 64 | testURL, err := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().("matrix://testuser:[email protected]?disableTLS=true") |
| 65 | 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).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`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 66 | |
| 67 | err = cfg.SetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#SetURL().(testURL) |
| 68 | 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).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`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 69 | 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().(cfg.Hostscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Host.).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().("matrix.example.com")) |
| 70 | 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().(cfg.Userscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#User.).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().("testuser")) |
| 71 | 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().(cfg.Passwordscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Password.).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().("testpass")) |
| 72 | }) |
| 73 | |
| 74 | 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 error when host is missing", func() { |
| 75 | cfg := &Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#{} |
| 76 | testURL, err := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().("matrix://testuser:testpass@") |
| 77 | 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).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`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 78 | |
| 79 | err = cfg.SetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#SetURL().(testURL) |
| 80 | 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).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().(ErrMissingHostscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/ErrMissingHost.)) |
| 81 | }) |
| 82 | |
| 83 | 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 error when password is missing", func() { |
| 84 | cfg := &Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#{} |
| 85 | testURL, err := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().("matrix://[email protected]") |
| 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).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`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 87 | |
| 88 | err = cfg.SetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#SetURL().(testURL) |
| 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().(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`/.Equalscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Equal().(ErrMissingCredentialsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/ErrMissingCredentials.)) |
| 90 | }) |
| 91 | |
| 92 | 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 prepend # to room aliases that don't have prefix", func() { |
| 93 | cfg := &Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#{} |
| 94 | testURL, err := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().("matrix://testuser:[email protected]?room=testroom") |
| 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).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`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 96 | |
| 97 | err = cfg.SetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#SetURL().(testURL) |
| 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().(err).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`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 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().(cfg.Roomsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Rooms.).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`/.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().(cfg.Roomsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Rooms.[0]).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().("#testroom")) |
| 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().("should not prepend # to room IDs that already have ! prefix", func() { |
| 104 | cfg := &Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#{} |
| 105 | testURL, err := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().("matrix://testuser:[email protected]?room=!testroom:matrix.example.com") |
| 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().(err).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`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 107 | |
| 108 | err = cfg.SetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#SetURL().(testURL) |
| 109 | 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).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`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 110 | 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().(cfg.Roomsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Rooms.[0]).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().("!testroom:matrix.example.com")) |
| 111 | }) |
| 112 | |
| 113 | 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 double-prefix room aliases that already have # prefix", func() { |
| 114 | cfg := &Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#{} |
| 115 | testURL, err := urlscip-go gomod github.com/golang/go/src . `net/url`/.Parsescip-go gomod github.com/golang/go/src . `net/url`/Parse().("matrix://testuser:[email protected]?room=%23myroom:matrix.example.com") |
| 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().(err).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`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 117 | |
| 118 | err = cfg.SetURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#SetURL().(testURL) |
| 119 | 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).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`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 120 | 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().(cfg.Roomsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Rooms.).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`/.BeEmptyscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/BeEmpty().()) |
| 121 | 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().(cfg.Roomsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/matrix`/Config#Rooms.[0]).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().("#myroom:matrix.example.com")) |
| 122 | }) |
| 123 | }) |
| 124 | }) |