taskbar_update_preference_tasks_spec.rb 517 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe TaskbarUpdatePreferenceTasks, type: :db_migration do
  4. let(:taskbar) { create(:taskbar) }
  5. it 'updates taskbar tasks' do
  6. freeze_time
  7. expect { migrate }
  8. .to change { taskbar.reload.preferences }
  9. .to({
  10. tasks: [
  11. { user_id: 1, id: taskbar.id, apps: { desktop: { last_contact: taskbar.last_contact, changed: false } } }
  12. ]
  13. })
  14. end
  15. end