Fixed bug: RSpec tests get stuck in time 👽
This commit is contained in:
parent
f80fbf4744
commit
cde033f8f7
3 changed files with 3 additions and 6 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue