1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-07-17 01:32:24 +02:00

Add many tests.

- Finish up render package, rename some things.
- Add authboss view data/error tests.
This commit is contained in:
Aaron
2015-02-20 05:08:11 -08:00
parent 585f842a5c
commit 8b87d9c826
6 changed files with 198 additions and 19 deletions

View File

@ -33,7 +33,7 @@ type ClientDataErr struct {
}
func (c ClientDataErr) Error() string {
return fmt.Sprintf("Failed to retrieve client attribute: %s (%v)", c.Name)
return fmt.Sprintf("Failed to retrieve client attribute: %s", c.Name)
}
// ErrAndRedirect represents a general error whose response should
@ -46,7 +46,7 @@ type ErrAndRedirect struct {
}
func (e ErrAndRedirect) Error() string {
return fmt.Sprintf("Error: %v, Redirecting to: %s", e.Error, e.Endpoint)
return fmt.Sprintf("Error: %v, Redirecting to: %s", e.Err, e.Endpoint)
}
// RenderErr represents an error that occured during rendering
@ -58,5 +58,5 @@ type RenderErr struct {
}
func (r RenderErr) Error() string {
return fmt.Sprintf("Error rendering template %q (%#v): %v", r.TemplateName, r.Data, r.Err)
return fmt.Sprintf("Error rendering template %q: %v, data: %#v", r.TemplateName, r.Err, r.Data)
}