tech_debt297_three_state_boolean_spec.rb 381 B

12345678910111213
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe TechDebt297ThreeStateBoolean, db_strategy: :reset, type: :db_migration do
  4. it 'migrates users.vip' do
  5. change_column_null :users, :vip, true
  6. user = create(:user, vip: nil)
  7. expect { migrate }.to change { user.reload.vip }.from(nil).to(false)
  8. end
  9. end