Created
November 4, 2021 02:44
-
-
Save sonya/b61ede65abf83b33e7716a55170b9288 to your computer and use it in GitHub Desktop.
http request mocking code samples
This file contains 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 characters
func TestGetFixedValue(t *testing.T) { | |
value, err := mockbyhand.GetFixedValue("http://localhost:8080") | |
if err != nil { | |
t.Error(err) | |
} | |
if value != "actualvalue" { | |
t.Errorf("Expected 'actualvalue', got %s", value) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment