BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1cc9bf86
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
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