Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3a7078a5
Commit
3a7078a5
authored
Feb 22, 2022
by
Siddharth Asthana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix usage of distance_of_time_in_words_to_now
Changelog: other
parent
a4d91d2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/controllers/groups/group_links_controller.rb
app/controllers/groups/group_links_controller.rb
+1
-1
spec/controllers/groups/group_links_controller_spec.rb
spec/controllers/groups/group_links_controller_spec.rb
+2
-1
No files found.
app/controllers/groups/group_links_controller.rb
View file @
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
...
...
spec/controllers/groups/group_links_controller_spec.rb
View file @
3a7078a5
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment