Commit 369386ae authored by zauberstuhl's avatar zauberstuhl

Fixed blacklisted user unit test

parent 7509575f
Pipeline #134 passed with stages
in 22 minutes and 57 seconds
......@@ -60,6 +60,7 @@ func (u User) Create() revel.Result {
if _, exists := helpers.UserBlacklist[username]; exists {
u.Flash.Error(u.Message("flash.errors.username"))
u.Response.Status = http.StatusResetContent
return u.Redirect(User.Index)
}
......
......@@ -35,7 +35,7 @@ func (t *UserTest) TestCreateUser() {
values.Set("confirm", "pppppp")
t.PostForm("/users/sign_up", values)
t.Assertf(t.Response.StatusCode != http.StatusOK,
"Expected status code %d for %s, got %d", http.StatusOK, name, t.Response.StatusCode)
t.Assertf(t.Response.StatusCode == http.StatusResetContent,
"Expected status code '%d' for '%s', got '%d'", http.StatusResetContent, name, t.Response.StatusCode)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment