Skip to content

Commit

Permalink
Merge pull request #437 from kir-dev/fix-papertrail-specs
Browse files Browse the repository at this point in the history
fix papertrail specs
  • Loading branch information
SepsiLaszlo authored Jun 19, 2024
2 parents 8cf95e6 + 21de252 commit 149c894
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
require 'paper_trail/frameworks/rspec'
PaperTrail.enabled = false


# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
Expand Down
4 changes: 2 additions & 2 deletions spec/workers/audit_cleaner_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Timecop.travel '2024-04-19'
user = create(:user)
user.update(nickname: 'asd')
expect(PaperTrail::Version.count).to be > 2
expect(PaperTrail::Version.count).to be 2

Timecop.travel '2024-08-19'
AuditCleanerWorker.new.perform
Expand All @@ -18,7 +18,7 @@
Timecop.travel '2024-04-19'
user = create(:user)
user.update(nickname: 'asd')
expect(PaperTrail::Version.count).to be > 2
expect(PaperTrail::Version.count).to be 2

Timecop.travel '2024-05-19'
expect { AuditCleanerWorker.new.perform }.not_to change { PaperTrail::Version.count }
Expand Down

0 comments on commit 149c894

Please sign in to comment.