Commit 7ef72f93 authored by Max Woolf's avatar Max Woolf

Merge branch 'issue_341248_group_links_controller' into 'master'

Fix usage of distance_of_time_in_words_to_now

See merge request gitlab-org/gitlab!81180
parents 598c96c9 3a7078a5
......@@ -11,7 +11,7 @@ class Groups::GroupLinksController < Groups::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
......
......@@ -79,7 +79,8 @@ RSpec.describe Groups::GroupLinksController do
subject
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