Fixed bug: RSpec tests get stuck in time 👽

This commit is contained in:
Thorsten Eckel 2018-06-25 12:09:25 +02:00
parent f80fbf4744
commit cde033f8f7
3 changed files with 3 additions and 6 deletions

View file

@ -108,10 +108,6 @@ RSpec.describe Import::OTRS::CustomerUser do
travel_to DateTime.current travel_to DateTime.current
end end
after(:each) do
travel_back
end
it 'creates' do it 'creates' do
creates_with(zammad_structure) creates_with(zammad_structure)
end end

View file

@ -78,8 +78,6 @@ RSpec.describe Taskbar do
expect(taskbar.last_contact.to_s).not_to eq(last_contact1.to_s) expect(taskbar.last_contact.to_s).not_to eq(last_contact1.to_s)
expect(taskbar.last_contact.to_s).not_to eq(last_contact2.to_s) expect(taskbar.last_contact.to_s).not_to eq(last_contact2.to_s)
travel_back
end end
UserInfo.current_user_id = nil UserInfo.current_user_id = nil

View file

@ -39,6 +39,9 @@ RSpec.configure do |config|
# make usage of time travel helpers possible # make usage of time travel helpers possible
config.include ActiveSupport::Testing::TimeHelpers config.include ActiveSupport::Testing::TimeHelpers
config.after(:each) do
travel_back
end
# Zammad specific helpers # Zammad specific helpers
config.include ZammadHelper config.include ZammadHelper