Commit c281d063 authored by Siddharth Asthana's avatar Siddharth Asthana

Fix display of times in access and deploy token table

Changelog: other
parent 2f33a8cb
......@@ -28,7 +28,7 @@ class Projects::GroupLinksController < Projects::ApplicationController
if group_link.expires?
render json: {
expires_in: helpers.distance_of_time_in_words_to_now(group_link.expires_at),
expires_in: helpers.time_ago_with_tooltip(group_link.expires_at),
expires_soon: group_link.expires_soon?
}
else
......
......@@ -178,7 +178,7 @@ RSpec.describe Projects::GroupLinksController do
context 'when `expires_at` is set' do
it 'returns correct json response' do
expect(json_response).to eq({ "expires_in" => "about 1 month", "expires_soon" => false })
expect(json_response).to eq({ "expires_in" => controller.helpers.time_ago_with_tooltip(expiry_date), "expires_soon" => false })
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