File: service.go

package info (click to toggle)
golang-github-nicholas-fedor-shoutrrr 0.8.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,332 kB
  • sloc: sh: 61; makefile: 5
file content (14 lines) | stat: -rw-r--r-- 455 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package testutils

import (
	"github.com/onsi/gomega"

	"github.com/nicholas-fedor/shoutrrr/pkg/types"
)

// TestServiceSetInvalidParamValue tests whether the service returns an error
// when an invalid param key/value is passed through Send.
func TestServiceSetInvalidParamValue(service types.Service, key string, value string) {
	err := service.Send("TestMessage", &types.Params{key: value})
	gomega.ExpectWithOffset(1, err).To(gomega.HaveOccurred())
}