Correct editable_helper spec and format issuable_app_data updated_at to iso8061

上级 aa1d87bd
......@@ -3,7 +3,7 @@ module EditableHelper
return {} unless editable.is_edited?
{
updated_at: editable.updated_at,
updated_at: editable.updated_at.to_time.iso8601,
updated_by: {
name: editable.last_edited_by.name,
path: user_path(editable.last_edited_by)
......
......@@ -7,7 +7,7 @@ describe EditableHelper do
let(:edited_editable) { create(:issue, last_edited_by: user, created_at: 3.days.ago, updated_at: 2.days.ago, last_edited_at: 2.days.ago) }
let(:edited_updated_at_by) do
{
updated_at: edited_editable.updated_at,
updated_at: edited_editable.updated_at.to_time.iso8601,
updated_by: {
name: user.name,
path: user_path(user)
......@@ -15,7 +15,7 @@ describe EditableHelper do
}
end
it { expect(helper.updated_at_by(unedited_editable)).to be_nil }
it { expect(helper.updated_at_by(unedited_editable)).to eq({}) }
it { expect(helper.updated_at_by(edited_editable)).to eq(edited_updated_at_by) }
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册