diff options
author | Rémy Coutable <remy@rymai.me> | 2017-03-07 19:34:43 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-04-14 15:20:55 +0200 |
commit | cfe19b795e076b73df75ee57839640667283651c (patch) | |
tree | e5de8f36de866a24a9e1068063a115640062e801 /spec/support/matchers | |
parent | 91ac0e038ab51dd2f30f2bb7c91837fa588ca250 (diff) | |
download | gitlab-ce-cfe19b795e076b73df75ee57839640667283651c.tar.gz |
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>
Diffstat (limited to 'spec/support/matchers')
-rw-r--r-- | spec/support/matchers/user_activity_matchers.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/matchers/user_activity_matchers.rb b/spec/support/matchers/user_activity_matchers.rb new file mode 100644 index 00000000000..ce3b683b6d2 --- /dev/null +++ b/spec/support/matchers/user_activity_matchers.rb @@ -0,0 +1,5 @@ +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 |