summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-09-22 09:12:47 +0000
committerRémy Coutable <remy@rymai.me>2017-09-22 09:12:47 +0000
commitcb8e2624d79504661d086a97b97af4a09b9ab8f3 (patch)
tree957f19a67506e1bae63518e0260754038e72a854
parent26607a1690631916baf5a39d198ff7096cb5bde6 (diff)
parent5af846539678a6a6a8959559a069da4243029720 (diff)
downloadgitlab-ce-cb8e2624d79504661d086a97b97af4a09b9ab8f3.tar.gz
Merge branch 'backport-ee-2983' into 'master'
Simplify a test See merge request gitlab-org/gitlab-ce!14415
-rw-r--r--spec/services/keys/last_used_service_spec.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/spec/services/keys/last_used_service_spec.rb b/spec/services/keys/last_used_service_spec.rb
index edaace293ae..bb0fb6acf39 100644
--- a/spec/services/keys/last_used_service_spec.rb
+++ b/spec/services/keys/last_used_service_spec.rb
@@ -26,12 +26,7 @@ describe Keys::LastUsedService do
# make sure we _only_ update last_used_at and not always updated_at.
key = create(:key, last_used_at: 1.year.ago)
- recorder = ActiveRecord::QueryRecorder.new do
- described_class.new(key).execute
- end
-
- expect(recorder.count).to eq(1)
- expect(recorder.log[0]).not_to include('updated_at')
+ expect { described_class.new(key).execute }.not_to change { key.updated_at }
end
end