From 0d2480e10fb1e0798b0791f631f2c49083fe60fb Mon Sep 17 00:00:00 2001 From: thinkerou Date: Fri, 20 Apr 2018 10:36:12 +0800 Subject: [PATCH] assert order --- binding/binding_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/binding/binding_test.go b/binding/binding_test.go index 0938dda2..ac826417 100644 --- a/binding/binding_test.go +++ b/binding/binding_test.go @@ -478,8 +478,8 @@ func TestBindingDefaultValueFormPost(t *testing.T) { var obj FooDefaultBarStruct FormPost.Bind(req, &obj) - assert.Equal(t, obj.Foo, "bar") - assert.Equal(t, obj.Bar, "hello") + assert.Equal(t, "bar", obj.Foo) + assert.Equal(t, "hello", obj.Bar) } func TestBindingFormPostFail(t *testing.T) { @@ -612,7 +612,7 @@ func testFormBinding(t *testing.T, method, path, badPath, body, badBody string) func testFormBindingDefaultValue(t *testing.T, method, path, badPath, body, badBody string) { b := Form - assert.Equal(t, b.Name(), "form") + assert.Equal(t, "form", b.Name()) obj := FooDefaultBarStruct{} req := requestWithBody(method, path, body) @@ -621,8 +621,8 @@ func testFormBindingDefaultValue(t *testing.T, method, path, badPath, body, badB } err := b.Bind(req, &obj) assert.NoError(t, err) - assert.Equal(t, obj.Foo, "bar") - assert.Equal(t, obj.Bar, "hello") + assert.Equal(t, "bar", obj.Foo) + assert.Equal(t, "hello", obj.Bar) obj = FooDefaultBarStruct{} req = requestWithBody(method, badPath, badBody)