diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2018-02-04 21:22:34 +0100 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2018-02-04 21:22:34 +0100 |
| commit | c2f6d1d6fb9a0dac7f7c5d871ed5237b02cc5196 (patch) | |
| tree | 4e2f5a04ddb02179dc63d93c66e03d9b65c34d7f /account_test.go | |
| parent | cd525f8ab11068a16b93035599887d8a8e4146d6 (diff) | |
| download | go-schwift-c2f6d1d6fb9a0dac7f7c5d871ed5237b02cc5196.tar.gz | |
build HTTP requests without ProviderClient.Request(), make tests work
Diffstat (limited to 'account_test.go')
| -rw-r--r-- | account_test.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/account_test.go b/account_test.go index 83567f9..7a07fa4 100644 --- a/account_test.go +++ b/account_test.go @@ -18,7 +18,10 @@ package schwift -import "testing" +import ( + "net/http" + "testing" +) func TestAccountBasic(t *testing.T) { testWithAccount(t, func(a *Account) { @@ -37,7 +40,7 @@ func TestAccountBasic(t *testing.T) { func TestAccountMetadata(t *testing.T) { testWithAccount(t, func(a *Account) { err := a.Post(AccountHeaders{ - Metadata: map[string]string{"schwift-test": "first"}, + Metadata: http.Header{"Schwift-Test": {"first"}}, }, nil) if !expectError(t, err, nil) { t.FailNow() @@ -47,6 +50,6 @@ func TestAccountMetadata(t *testing.T) { if !expectError(t, err, nil) { t.FailNow() } - expectString(t, hdr.Metadata["schwift-test"], "first") + expectString(t, hdr.Metadata.Get("schwift-test"), "first") }) } |
