gitlab-org--gitlab-foss/spec/support/matchers/user_activity_matchers.rb
Rémy Coutable cfe19b795e Add a new Gitlab::UserActivities class to track user activities
This new class uses a Redis Hash instead of a Sorted Set.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-14 15:20:55 +02:00

5 lines
177 B
Ruby

RSpec::Matchers.define :have_an_activity_record do |expected|
match do |user|
expect(Gitlab::UserActivities.new.find { |k, _| k == user.id.to_s }).to be_present
end
end