Adding unit test for ToURL

Signed-off-by: Jonas Franz <info@jonasfranz.de>
pull/1/head
Jonas Franz 7 years ago
parent ce433b42be
commit 7779b60987
  1. 11
      plugin_test.go

@ -0,0 +1,11 @@
package main
import "testing"
func TestConfig_ToURL(t *testing.T) {
exampleConfig := &Config{Identifier: "test", Key: "MYKEY"}
result := exampleConfig.ToURL()
if result != "https://api.crowdin.com/api/project/test/update-file?key=MYKEY" {
t.Fatalf("ToURL returns \"%s\" instead of the expected \"%s\"", result, "https://api.crowdin.com/api/project/test/update-file?key=MYKEY")
}
}
Loading…
Cancel
Save