Skip to content

Commit

Permalink
Merge branch 'master' into vendor-update
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas committed Jun 4, 2017
2 parents 62119cd + af88368 commit cc97f5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions client/manager_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import (
"database/sql"
"fmt"
"strings"

"context"

"github.com/imdario/mergo"
"github.com/jmoiron/sqlx"
"github.com/ory/fosite"
"github.com/ory/hydra/pkg"
Expand Down Expand Up @@ -159,9 +157,6 @@ func (m *SQLManager) UpdateClient(c *Client) error {
}
c.Secret = string(h)
}
if err := mergo.Merge(c, o); err != nil {
return errors.WithStack(err)
}

s := sqlDataFromClient(c)
var query []string
Expand Down
3 changes: 2 additions & 1 deletion client/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ func TestCreateGetDeleteClient(t *testing.T) {
ID: "2-1234",
Name: "name-new",
Secret: "secret-new",
RedirectURIs: []string{"http://redirect/new"},
TermsOfServiceURI: "bar",
})
assert.Nil(t, err)
Expand All @@ -187,7 +188,7 @@ func TestCreateGetDeleteClient(t *testing.T) {
}
assert.Equal(t, "bar", nc.TermsOfServiceURI, "%s", k)
assert.Equal(t, "name-new", nc.Name, "%s", k)
assert.EqualValues(t, []string{"http://redirect"}, nc.GetRedirectURIs(), "%s", k)
assert.EqualValues(t, []string{"http://redirect/new"}, nc.GetRedirectURIs(), "%s", k)

err = m.DeleteClient("1234")
assert.Nil(t, err)
Expand Down

0 comments on commit cc97f5e

Please sign in to comment.