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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
1cc9bf86
Commit
1cc9bf86
authored
Mar 29, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ChatNames::FindUserService stable by not checking a precise time
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
839183f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
spec/services/chat_names/find_user_service_spec.rb
spec/services/chat_names/find_user_service_spec.rb
+8
-1
No files found.
spec/services/chat_names/find_user_service_spec.rb
View file @
1cc9bf86
...
...
@@ -18,9 +18,16 @@ describe ChatNames::FindUserService, services: true do
end
it
'updates when last time chat name was used'
do
expect
(
chat_name
.
last_used_at
).
to
be_nil
subject
expect
(
chat_name
.
reload
.
last_used_at
).
to
be_like_time
(
Time
.
now
)
initial_last_used
=
chat_name
.
reload
.
last_used_at
expect
(
initial_last_used
).
to
be_present
Timecop
.
travel
(
2
.
days
.
from_now
)
{
described_class
.
new
(
service
,
params
).
execute
}
expect
(
chat_name
.
reload
.
last_used_at
).
to
be
>
initial_last_used
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