diff options
author | Stan Hu <stanhu@gmail.com> | 2017-12-12 15:46:05 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-12-12 17:12:45 -0800 |
commit | 4b0465f20de1bf58326c7daf6876b63438f00d84 (patch) | |
tree | 0424373b472e20906f66d94783c86f4ff7f3060f /spec/lib | |
parent | 02e7e499d4011733c1cf0f6fb675dd2d309f0d52 (diff) | |
download | gitlab-ce-4b0465f20de1bf58326c7daf6876b63438f00d84.tar.gz |
Address review comments with playing pipeline schedulersh-add-schedule-pipeline-run-now
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/action_rate_limiter_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/lib/gitlab/action_rate_limiter_spec.rb b/spec/lib/gitlab/action_rate_limiter_spec.rb index 84661605623..542fc03e555 100644 --- a/spec/lib/gitlab/action_rate_limiter_spec.rb +++ b/spec/lib/gitlab/action_rate_limiter_spec.rb @@ -2,8 +2,10 @@ require 'spec_helper' describe Gitlab::ActionRateLimiter do let(:redis) { double('redis') } - let(:key) { 'user:1' } - let(:cache_key) { "action_rate_limiter:test_action:#{key}" } + let(:user) { create(:user) } + let(:project) { create(:project) } + let(:key) { [user, project] } + let(:cache_key) { "action_rate_limiter:test_action:user:#{user.id}:project:#{project.id}" } subject { described_class.new(action: :test_action, expiry_time: 100) } |