Commit 5346cfc6 authored by Siddharth Asthana's avatar Siddharth Asthana

Fix display of times in access and deploy token table

The expires_in key being returned by GroupMembersController#update
and ProjectMembersController#update does not seem to be used.

Changelog: fixed
parent 972c82a1
...@@ -26,7 +26,6 @@ module MembershipActions ...@@ -26,7 +26,6 @@ module MembershipActions
member_data = if member.expires? member_data = if member.expires?
{ {
expires_in: helpers.distance_of_time_in_words_to_now(member.expires_at),
expires_soon: member.expires_soon?, expires_soon: member.expires_soon?,
expires_at_formatted: member.expires_at.to_time.in_time_zone.to_s(:medium) expires_at_formatted: member.expires_at.to_time.in_time_zone.to_s(:medium)
} }
......
...@@ -293,7 +293,6 @@ RSpec.describe Groups::GroupMembersController do ...@@ -293,7 +293,6 @@ RSpec.describe Groups::GroupMembersController 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({ expect(json_response).to eq({
"expires_in" => "about 1 month",
"expires_soon" => false, "expires_soon" => false,
"expires_at_formatted" => expiry_date.to_time.in_time_zone.to_s(:medium) "expires_at_formatted" => expiry_date.to_time.in_time_zone.to_s(:medium)
}) })
......
...@@ -369,7 +369,6 @@ RSpec.describe Projects::ProjectMembersController do ...@@ -369,7 +369,6 @@ RSpec.describe Projects::ProjectMembersController 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({ expect(json_response).to eq({
"expires_in" => "about 1 month",
"expires_soon" => false, "expires_soon" => false,
"expires_at_formatted" => expiry_date.to_time.in_time_zone.to_s(:medium) "expires_at_formatted" => expiry_date.to_time.in_time_zone.to_s(:medium)
}) })
......
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