Skip to content

Commit

Permalink
Improved tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler King committed Mar 29, 2019
1 parent 9b41d52 commit 24f80d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions http_shopify_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 11,7 @@ import (
// Test base verification function works.
func TestVerifyRequest(t *testing.T) {
// Setup a simple body with a matching HMAC.
body := []byte("{\"key\":\"value\"}")
body := []byte(`{"key":"value"}`)
hmac := "7iASoA8WSbw19M/h lgrLr2ly/LvgnE9bcLsk9gflvs="
shop := "example.myshopify.com"

Expand All @@ -22,7 22,7 @@ func TestVerifyRequest(t *testing.T) {

func TestVerifyRequestError(t *testing.T) {
// Setup a simple body with a matching HMAC, but missing shop.
body := []byte("{\"key\":\"value\"}")
body := []byte(`{"key":"value"}`)
hmac := "ee2012a00f1649bc35f4cfe1fa582b2ebda5cbf2ef82713d6dc2ec93d81f96fb"
shop := ""

Expand All @@ -43,7 43,7 @@ func TestVerifyRequestError(t *testing.T) {
func TestNetHttpSuccess(t *testing.T) {
// Set our data.
key := "secret"
body := "{\"key\":\"value\"}"
body := `{"key":"value"}`
hmac := "7iASoA8WSbw19M/h lgrLr2ly/LvgnE9bcLsk9gflvs="
shop := "example.myshopify.com"

Expand All @@ -63,7 63,7 @@ func TestNetHttpSuccess(t *testing.T) {
func TestNetHttpFailure(t *testing.T) {
// Set our data.
key := "secret"
body := "{\"key\":\"value\"}"
body := `{"key":"value"}`
hmac := "ee2012a00f1649bc35f"
shop := "example.myshopify.com"

Expand Down

0 comments on commit 24f80d6

Please sign in to comment.