mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 16:29:52 +01:00
12 lines
331 B
Ruby
12 lines
331 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
RSpec.shared_examples_for "touches user timestamp" do |timestamp_column|
|
||
|
include ActiveSupport::Testing::TimeHelpers
|
||
|
|
||
|
it "touches #{timestamp_column}" do
|
||
|
travel_to(1.day.from_now) do
|
||
|
expect { subject }.to change { user.reload.send(timestamp_column) }.to(DateTime.now)
|
||
|
end
|
||
|
end
|
||
|
end
|