1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 04:21:57 +00:00

Add test for basic auth

This commit is contained in:
Makis Maropoulos
2016-07-02 18:53:36 +02:00
parent 263fc77e5c
commit 90c7e1466c
7 changed files with 160 additions and 40 deletions

View File

@@ -37,7 +37,7 @@ func TestBindForm(t *testing.T) {
ctx.JSON(iris.StatusOK, obj)
})
e := tester(api, t)
e := Tester(api, t)
passed := map[string]interface{}{"Username": "myusername", "Mail": "mymail@iris-go.com", "mydata": url.Values{"[0]": []string{"mydata1"},
"[1]": []string{"mydata2"}}}
@@ -57,7 +57,7 @@ func TestBindJSON(t *testing.T) {
ctx.JSON(iris.StatusOK, obj)
})
e := tester(api, t)
e := Tester(api, t)
passed := map[string]interface{}{"Username": "myusername", "Mail": "mymail@iris-go.com", "mydata": []string{"mydata1", "mydata2"}}
expectedObject := testBinderData{Username: "myusername", Mail: "mymail@iris-go.com", Data: []string{"mydata1", "mydata2"}}
@@ -75,7 +75,7 @@ func TestBindXML(t *testing.T) {
ctx.XML(iris.StatusOK, obj)
})
e := tester(api, t)
e := Tester(api, t)
expectedObj := testBinderXMLData{
XMLName: xml.Name{Local: "info", Space: "info"},
FirstAttr: "this is the first attr",