Created
November 4, 2021 02:42
-
-
Save sonya/3ea4f2bcebfcaed2c8c3cf7be7f62f34 to your computer and use it in GitHub Desktop.
Revisions
-
sonya created this gist
Nov 4, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ func TestGetFixedValue(t *testing.T) { defer gock.Off() gock.New("https://example.com/fixedvalue"). MatchHeader("Accept", "application/json"). Get("/"). Reply(200). JSON(map[string]string{"value": "fixed"}) value, _ := GetFixedValue("https://example.com") if value != "fixed" { t.Errorf("Expected 'fixed', got %s", value) } }