repair edit.html.erb and finish tests