Commit 065a52c8 authored by Sean McGivern's avatar Sean McGivern

Merge branch '28462-fix-delimiter-removes-issue-in-todo-counter' into 'master'

fixes delimiter removes when todo marked as done

Closes #28462

See merge request !9435
parents a7a08738 6f5b3dc7
class Dashboard::TodosController < Dashboard::ApplicationController
include ActionView::Helpers::NumberHelper
before_action :find_todos, only: [:index, :destroy_all]
def index
......@@ -48,8 +50,8 @@ class Dashboard::TodosController < Dashboard::ApplicationController
def todos_counts
{
count: current_user.todos_pending_count,
done_count: current_user.todos_done_count
count: number_with_delimiter(current_user.todos_pending_count),
done_count: number_with_delimiter(current_user.todos_done_count)
}
end
end
---
title: Fixes delimiter removes when todo marked as done
merge_request: 9435
author:
......@@ -46,7 +46,7 @@ describe Dashboard::TodosController do
expect(todo.reload).to be_pending
expect(response).to have_http_status(200)
expect(json_response).to eq({ "count" => 1, "done_count" => 0 })
expect(json_response).to eq({ "count" => "1", "done_count" => "0" })
end
end
end
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