From 0e8ef26081dc079212bf2bf50f112e91247a46a0 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Wed, 13 Nov 2019 09:44:36 +0100 Subject: [PATCH] Example #13: Frisby + Unit tests --- testing/frisby/13_frisby_as_test_pass_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 testing/frisby/13_frisby_as_test_pass_test.go diff --git a/testing/frisby/13_frisby_as_test_pass_test.go b/testing/frisby/13_frisby_as_test_pass_test.go new file mode 100644 index 0000000..a6fc1ce --- /dev/null +++ b/testing/frisby/13_frisby_as_test_pass_test.go @@ -0,0 +1,16 @@ +package main + +import ( + "github.com/verdverm/frisby" + "testing" +) + +func TestHttpGet(t *testing.T) { + f := frisby.Create("Simplest test").Get("http://httpbin.org/get") + f.Send() + f.ExpectStatus(200) + err := f.Error() + if err != nil { + t.Error(err) + } +}