Commit 7feee45c authored by David O'Regan's avatar David O'Regan

Merge branch 'issue_341248_3' into 'master'

Fix display of times in access and deploy token table

See merge request gitlab-org/gitlab!75840
parents e0c296a7 c281d063
...@@ -28,7 +28,7 @@ class Projects::GroupLinksController < Projects::ApplicationController ...@@ -28,7 +28,7 @@ class Projects::GroupLinksController < Projects::ApplicationController
if group_link.expires? if group_link.expires?
render json: { 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? expires_soon: group_link.expires_soon?
} }
else else
......
...@@ -178,7 +178,7 @@ RSpec.describe Projects::GroupLinksController do ...@@ -178,7 +178,7 @@ RSpec.describe Projects::GroupLinksController do
context 'when `expires_at` is set' do context 'when `expires_at` is set' do
it 'returns correct json response' 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
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